public abstract class LineMetrics extends Object
LineMetrics类允许访问沿着一行布置字符和布局一组行所需的度量。
LineMetrics对象封装与文本运行相关联的测量信息。
字体可以为不同范围的字符使用不同的指标。 所述getLineMetrics的方法Font采取一些文本作为参数,并返回一个LineMetrics对象描述在该文本字符的初始数量的度量,由返回的getNumChars() 。
| Constructor and Description |
|---|
LineMetrics() |
| Modifier and Type | Method and Description |
|---|---|
abstract float |
getAscent()
返回文本的上升。
|
abstract int |
getBaselineIndex()
返回文本的基准索引。
|
abstract float[] |
getBaselineOffsets()
返回相对于文本基线的文本的基线偏移量。
|
abstract float |
getDescent()
返回文本的下降。
|
abstract float |
getHeight()
返回文本的高度。
|
abstract float |
getLeading()
返回文本的前导。
|
abstract int |
getNumChars()
返回文本中由此
LineMetrics对象封装其度量标准的字符数(
char值)。
|
abstract float |
getStrikethroughOffset()
返回贯穿线相对于基线的位置。
|
abstract float |
getStrikethroughThickness()
返回贯穿线的厚度。
|
abstract float |
getUnderlineOffset()
返回下划线相对于基线的位置。
|
abstract float |
getUnderlineThickness()
返回下划线的厚度。
|
public abstract int getNumChars()
LineMetrics对象封装其度量标准的文本中的字符数(
char值)。
LineMetrics的文本中的字符数(
char值)。
public abstract float getAscent()
public abstract float getDescent()
public abstract float getLeading()
public abstract float getHeight()
public abstract int getBaselineIndex()
ROMAN_BASELINE , CENTER_BASELINE , HANGING_BASELINE 。
public abstract float[] getBaselineOffsets()
CENTER_BASELINE那么offsets[HANGING_BASELINE]通常为负, offsets[CENTER_BASELINE]为零, offsets[ROMAN_BASELINE]通常为正。
public abstract float getStrikethroughOffset()
public abstract float getStrikethroughThickness()
public abstract float getUnderlineOffset()
public abstract float getUnderlineThickness()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.