@Override
public void figureGraphics( String src, SinkEventAttributes attributes )
{
if ( inFigure )
{
MutableAttributeSet atts = new SinkEventAttributeSet( 1 );
atts.addAttribute( SinkEventAttributes.ALIGN, "center" );
writeStartTag( HtmlMarkup.P, atts );
}
MutableAttributeSet filtered = SinkUtils.filterAttributes( attributes, SinkUtils.SINK_IMG_ATTRIBUTES );
if ( filtered != null )
{
filtered.removeAttribute( Attribute.SRC.toString() );
}
int count = ( attributes == null ? 1 : attributes.getAttributeCount() + 1 );
MutableAttributeSet atts = new SinkEventAttributeSet( count );
atts.addAttribute( Attribute.SRC, escapeHTML( src ) );
atts.addAttributes( filtered );
if ( atts.getAttribute( Attribute.ALT.toString() ) == null )
{
atts.addAttribute( Attribute.ALT.toString(), "" );
}
writeStartTag( HtmlMarkup.IMG, atts, true );
if ( inFigure )