Class SVGAltGlyphElementBridge

java.lang.Object
org.apache.batik.bridge.AbstractSVGBridge
org.apache.batik.bridge.SVGAltGlyphElementBridge
All Implemented Interfaces:
Bridge, ErrorConstants, XMLConstants, CSSConstants, SVGConstants

public class SVGAltGlyphElementBridge extends AbstractSVGBridge implements ErrorConstants
Bridge class for the <altGlyph> element.
Version:
$Id: SVGAltGlyphElementBridge.java 1851346 2019-01-15 13:41:00Z ssteiner $
  • Field Details

  • Constructor Details

    • SVGAltGlyphElementBridge

      public SVGAltGlyphElementBridge()
      Constructs a new bridge for the <altGlyph> element.
  • Method Details

    • getLocalName

      public String getLocalName()
      Returns 'altGlyph'.
      Specified by:
      getLocalName in interface Bridge
    • createAltGlyphArray

      public Glyph[] createAltGlyphArray(BridgeContext ctx, Element altGlyphElement, float fontSize, AttributedCharacterIterator aci)
      Constructs an array of Glyphs that represents the specified <altGlyph> element at the requested size.
      Parameters:
      ctx - The current bridge context.
      altGlyphElement - The altGlyph element to base the SVGGVTGlyphVector construction on.
      fontSize - The font size of the Glyphs to create.
      Returns:
      The new SVGGVTGlyphVector or null if any of the glyphs are unavailable.
    • getGlyph

      private Glyph getGlyph(BridgeContext ctx, String glyphUri, Element altGlyphElement, float fontSize, AttributedCharacterIterator aci)
      Returns a Glyph object that represents the glyph at the specified URI scaled to the required font size.
      Parameters:
      ctx - The bridge context.
      glyphUri - The URI of the glyph to retreive.
      altGlyphElement - The element that references the glyph.
      fontSize - Indicates the required size of the glyph.
      Returns:
      The Glyph or null if the glyph URI is not available.