org.apache.batik.bridge

Class SVGAltGlyphHandler

public class SVGAltGlyphHandler extends Object implements AltGlyphHandler, SVGConstants

SVG font altGlyph handler. This class handles the creation of an alternate GVTGlyphVector for the altGlyph element.
Constructor Summary
SVGAltGlyphHandler(BridgeContext ctx, Element textElement)
Constructs an SVGAltGlyphHandler.
Method Summary
GVTGlyphVectorcreateGlyphVector(FontRenderContext frc, float fontSize, AttributedCharacterIterator aci)
Creates a glyph vector containing the alternate glyphs.

Constructor Detail

SVGAltGlyphHandler

public SVGAltGlyphHandler(BridgeContext ctx, Element textElement)
Constructs an SVGAltGlyphHandler.

Parameters: ctx The bridge context, this is needed during rendering to find any referenced glyph elements. textElement The element that contains text to be replaced by the alternate glyphs. This should be an altGlyph element.

Method Detail

createGlyphVector

public GVTGlyphVector createGlyphVector(FontRenderContext frc, float fontSize, AttributedCharacterIterator aci)
Creates a glyph vector containing the alternate glyphs.

Parameters: frc The current font render context. fontSize The required font size.

Returns: The GVTGlyphVector containing the alternate glyphs, or null if the alternate glyphs could not be found.

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.