org.apache.batik.gvt.font

Class 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
GVTGlyphMetrics(GlyphMetrics gm, float verticalAdvance)
Constructs a new GVTGlyphMetrics object based upon the specified GlyphMetrics object and an additional vertical advance value.
GVTGlyphMetrics(float horizontalAdvance, float verticalAdvance, Rectangle2D bounds, byte glyphType)
Constructs a new GVTGlyphMetrics object using the specified parameters.
Method Summary
Rectangle2DgetBounds2D()
Returns the black box bounds of the glyph.
floatgetHorizontalAdvance()
Returns the horizontal advance of the glyph.
floatgetLSB()
Returns the left (top) side bearing of the glyph.
floatgetRSB()
Returns the right (bottom) side bearing of the glyph.
intgetType()
Returns the raw glyph type code.
floatgetVerticalAdvance()
Returns the vertical advance of the glyph.
booleanisCombining()
Returns true if this is a combining glyph.
booleanisComponent()
Returns true if this is a component glyph.
booleanisLigature()
Returns true if this is a ligature glyph.
booleanisStandard()
Returns true if this is a standard glyph.
booleanisWhitespace()
Returns true if this is a whitespace glyph.

Constructor Detail

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 Detail

getBounds2D

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

getHorizontalAdvance

public float getHorizontalAdvance()
Returns the horizontal advance 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.

getVerticalAdvance

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

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.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.