| |
|
| java.lang.Object java.awt.font.LineMetrics
LineMetrics | abstract public class LineMetrics (Code) | | The LineMetrics class allows access to the
metrics needed to layout characters along a line
and to layout of a set of lines. A LineMetrics
object encapsulates the measurement information associated
with a run of text.
Fonts can have different metrics for different ranges of
characters. The getLineMetrics methods of
java.awt.Font Font take some text as an argument
and return a LineMetrics object describing the
metrics of the initial number of characters in that text, as
returned by
LineMetrics.getNumChars .
|
Method Summary | |
abstract public float | getAscent() Returns the ascent of the text. | abstract public int | getBaselineIndex() Returns the baseline index of the text. | abstract public float[] | getBaselineOffsets() Returns the baseline offsets of the text,
relative to the baseline of the text. | abstract public float | getDescent() Returns the descent of the text. | abstract public float | getHeight() Returns the height of the text. | abstract public float | getLeading() Returns the leading of the text. | abstract public int | getNumChars() Returns the number of characters (char values) in the text whose
metrics are encapsulated by this LineMetrics
object. | abstract public float | getStrikethroughOffset() Returns the position of the strike-through line
relative to the baseline. | abstract public float | getStrikethroughThickness() Returns the thickness of the strike-through line.
the thickness of the strike-through line. | abstract public float | getUnderlineOffset() Returns the position of the underline relative to
the baseline. | abstract public float | getUnderlineThickness() Returns the thickness of the underline. |
getAscent | abstract public float getAscent()(Code) | | Returns the ascent of the text. The ascent
is the distance from the baseline
to the ascender line. The ascent usually represents the
the height of the capital letters of the text. Some characters
can extend above the ascender line.
the ascent of the text. |
getBaselineOffsets | abstract public float[] getBaselineOffsets()(Code) | | Returns the baseline offsets of the text,
relative to the baseline of the text. The
offsets are indexed by baseline index. For
example, if the baseline index is
CENTER_BASELINE then
offsets[HANGING_BASELINE] is usually
negative, offsets[CENTER_BASELINE]
is zero, and offsets[ROMAN_BASELINE]
is usually positive.
the baseline offsets of the text. |
getDescent | abstract public float getDescent()(Code) | | Returns the descent of the text. The descent
is the distance from the baseline
to the descender line. The descent usually represents
the distance to the bottom of lower case letters like
'p'. Some characters can extend below the descender
line.
the descent of the text. |
getHeight | abstract public float getHeight()(Code) | | Returns the height of the text. The
height is equal to the sum of the ascent, the
descent and the leading.
the height of the text. |
getLeading | abstract public float getLeading()(Code) | | Returns the leading of the text. The
leading is the recommended
distance from the bottom of the descender line to the
top of the next line.
the leading of the text. |
getNumChars | abstract public int getNumChars()(Code) | | Returns the number of characters (char values) in the text whose
metrics are encapsulated by this LineMetrics
object.
the number of characters (char values) in the text with whichthis LineMetrics was created. |
getStrikethroughOffset | abstract public float getStrikethroughOffset()(Code) | | Returns the position of the strike-through line
relative to the baseline.
the position of the strike-through line. |
getStrikethroughThickness | abstract public float getStrikethroughThickness()(Code) | | Returns the thickness of the strike-through line.
the thickness of the strike-through line. |
getUnderlineOffset | abstract public float getUnderlineOffset()(Code) | | Returns the position of the underline relative to
the baseline.
the position of the underline. |
getUnderlineThickness | abstract public float getUnderlineThickness()(Code) | | Returns the thickness of the underline.
the thickness of the underline. |
|
|
|