Package org.apache.batik.gvt.font
Class GVTLineMetrics
- java.lang.Object
-
- org.apache.batik.gvt.font.GVTLineMetrics
-
public class GVTLineMetrics extends java.lang.ObjectGVTLineMetrics is a GVT version of java.awt.font.LineMetrics.- Version:
- $Id: GVTLineMetrics.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected floatascentprotected intbaselineIndexprotected float[]baselineOffsetsprotected floatdescentprotected floatheightprotected floatleadingprotected intnumCharsprotected floatoverlineOffsetprotected floatoverlineThicknessprotected floatstrikethroughOffsetprotected floatstrikethroughThicknessprotected floatunderlineOffsetprotected floatunderlineThickness
-
Constructor Summary
Constructors Constructor Description GVTLineMetrics(float ascent, int baselineIndex, float[] baselineOffsets, float descent, float height, float leading, int numChars, float strikethroughOffset, float strikethroughThickness, float underlineOffset, float underlineThickness, float overlineOffset, float overlineThickness)Constructs a GVTLineMetrics object with the specified attributes.GVTLineMetrics(java.awt.font.LineMetrics lineMetrics)Constructs a GVTLineMetrics object based on the specified line metrics.GVTLineMetrics(java.awt.font.LineMetrics lineMetrics, float scaleFactor)Constructs a GVTLineMetrics object based on the specified line metrics with a scale factor applied.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetAscent()Returns the ascent of the text.intgetBaselineIndex()Returns the baseline index of the text.float[]getBaselineOffsets()Returns the baseline offsets of the text, relative to the baseline of the text.floatgetDescent()Returns the descent of the text.floatgetHeight()Returns the height of the text.floatgetLeading()Returns the leading of the text.intgetNumChars()Returns the number of characters in the text whose metrics are encapsulated by this LineMetrics object.floatgetOverlineOffset()Returns the position of the overline relative to the baseline.floatgetOverlineThickness()Returns the thickness of the overline.floatgetStrikethroughOffset()Returns the position of the strike-through line relative to the baseline.floatgetStrikethroughThickness()Returns the thickness of the strike-through line.floatgetUnderlineOffset()Returns the position of the underline relative to the baseline.floatgetUnderlineThickness()Returns the thickness of the underline.
-
-
-
Field Detail
-
ascent
protected float ascent
-
baselineIndex
protected int baselineIndex
-
baselineOffsets
protected float[] baselineOffsets
-
descent
protected float descent
-
height
protected float height
-
leading
protected float leading
-
numChars
protected int numChars
-
strikethroughOffset
protected float strikethroughOffset
-
strikethroughThickness
protected float strikethroughThickness
-
underlineOffset
protected float underlineOffset
-
underlineThickness
protected float underlineThickness
-
overlineOffset
protected float overlineOffset
-
overlineThickness
protected float overlineThickness
-
-
Constructor Detail
-
GVTLineMetrics
public GVTLineMetrics(java.awt.font.LineMetrics lineMetrics)
Constructs a GVTLineMetrics object based on the specified line metrics.- Parameters:
lineMetrics- The lineMetrics object that this metrics object will be based upon.
-
GVTLineMetrics
public GVTLineMetrics(java.awt.font.LineMetrics lineMetrics, float scaleFactor)Constructs a GVTLineMetrics object based on the specified line metrics with a scale factor applied.- Parameters:
lineMetrics- The lineMetrics object that this metrics object will be based upon.scaleFactor- The scale factor to apply to all metrics.
-
GVTLineMetrics
public GVTLineMetrics(float ascent, int baselineIndex, float[] baselineOffsets, float descent, float height, float leading, int numChars, float strikethroughOffset, float strikethroughThickness, float underlineOffset, float underlineThickness, float overlineOffset, float overlineThickness)Constructs a GVTLineMetrics object with the specified attributes.
-
-
Method Detail
-
getAscent
public float getAscent()
Returns the ascent of the text.
-
getBaselineIndex
public int getBaselineIndex()
Returns the baseline index of the text.
-
getBaselineOffsets
public float[] getBaselineOffsets()
Returns the baseline offsets of the text, relative to the baseline of the text.
-
getDescent
public float getDescent()
Returns the descent of the text.
-
getHeight
public float getHeight()
Returns the height of the text.
-
getLeading
public float getLeading()
Returns the leading of the text.
-
getNumChars
public int getNumChars()
Returns the number of characters in the text whose metrics are encapsulated by this LineMetrics object.
-
getStrikethroughOffset
public float getStrikethroughOffset()
Returns the position of the strike-through line relative to the baseline.
-
getStrikethroughThickness
public float getStrikethroughThickness()
Returns the thickness of the strike-through line.
-
getUnderlineOffset
public float getUnderlineOffset()
Returns the position of the underline relative to the baseline.
-
getUnderlineThickness
public float getUnderlineThickness()
Returns the thickness of the underline.
-
getOverlineOffset
public float getOverlineOffset()
Returns the position of the overline relative to the baseline.
-
getOverlineThickness
public float getOverlineThickness()
Returns the thickness of the overline.
-
-