public abstract class LineMetrics extends Object
LineMetrics
类允许访问所需的布局特征沿一条线和一组线路布局的度量。一个
LineMetrics
对象封装了一个文本相关的测量信息。
字体可以有不同的字符范围的不同的度量。对Font
的getLineMetrics
方法采取一些文本作为参数并返回一个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()
返回的字符数(
char 值)的指标是由这
LineMetrics 对象封装了文本。
|
abstract float |
getStrikethroughOffset()
返回通过行相对于基线的位置。
|
abstract float |
getStrikethroughThickness()
返回通过线的厚度。
|
abstract float |
getUnderlineOffset()
返回相对于基线的下划线的位置。
|
abstract float |
getUnderlineThickness()
返回下划线的厚度。
|
public abstract int getNumChars()
char
值)的指标是由这
LineMetrics
对象封装了文本。
char
值)在文本,这
LineMetrics
创建。
public abstract float getAscent()
public abstract float getDescent()
public abstract float getLeading()
public abstract float getHeight()
public abstract int getBaselineIndex()
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.