Class GVTGlyphMetrics

java.lang.Object
org.apache.batik.gvt.font.GVTGlyphMetrics

public class GVTGlyphMetrics extends Object
GVTGlyphMetrics is essentially a wrapper class for java.awt.font.GlyphMetrics with the addition of horizontal and vertical advance values.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GVTGlyphMetrics(float horizontalAdvance, float verticalAdvance, Rectangle2D bounds, byte glyphType)
    Constructs a new GVTGlyphMetrics object using the specified parameters.
    GVTGlyphMetrics(GlyphMetrics gm, float verticalAdvance)
    Constructs a new GVTGlyphMetrics object based upon the specified GlyphMetrics object and an additional vertical advance value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the black box bounds of the glyph.
    float
    Returns the horizontal advance of the glyph.
    float
    Returns the left (top) side bearing of the glyph.
    float
    Returns the right (bottom) side bearing of the glyph.
    int
    Returns the raw glyph type code.
    float
    Returns the vertical advance of the glyph.
    boolean
    Returns true if this is a combining glyph.
    boolean
    Returns true if this is a component glyph.
    boolean
    Returns true if this is a ligature glyph.
    boolean
    Returns true if this is a standard glyph.
    boolean
    Returns true if this is a whitespace glyph.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GVTGlyphMetrics

      public GVTGlyphMetrics(GlyphMetrics gm, float verticalAdvance)
      Constructs a new GVTGlyphMetrics object based upon the specified GlyphMetrics object and an additional vertical advance value.
      Parameters:
      gm - The glyph metrics.
      verticalAdvance - The vertical advance of the glyph.
    • GVTGlyphMetrics

      public GVTGlyphMetrics(float horizontalAdvance, float verticalAdvance, Rectangle2D bounds, byte glyphType)
      Constructs a new GVTGlyphMetrics object using the specified parameters.
      Parameters:
      horizontalAdvance - The horizontal advance of the glyph.
      verticalAdvance - The vertical advance of the glyph.
      bounds - The black box bounds of the glyph.
      glyphType - The type of the glyph.
  • Method Details

    • getHorizontalAdvance

      public float getHorizontalAdvance()
      Returns the horizontal advance of the glyph.
    • getVerticalAdvance

      public float getVerticalAdvance()
      Returns the vertical advance of the glyph.
    • getBounds2D

      public Rectangle2D getBounds2D()
      Returns the black box bounds of the glyph.
    • getLSB

      public float getLSB()
      Returns the left (top) side bearing of the glyph.
    • getRSB

      public float getRSB()
      Returns the right (bottom) side bearing of the glyph.
    • getType

      public int getType()
      Returns the raw glyph type code.
    • isCombining

      public boolean isCombining()
      Returns true if this is a combining glyph.
    • isComponent

      public boolean isComponent()
      Returns true if this is a component glyph.
    • isLigature

      public boolean isLigature()
      Returns true if this is a ligature glyph.
    • isStandard

      public boolean isStandard()
      Returns true if this is a standard glyph.
    • isWhitespace

      public boolean isWhitespace()
      Returns true if this is a whitespace glyph.