public class LineHeightRichStyle extends RichStyle
RichText instance.
You can adjust the line height by adjusting the line spacing or adjusting the ascent/descent in a proportion.
RichText.setRichStyle(RichStyle, int, int, RangedRichStyle.Flag)RichStyle.Capability, RichStyle.TypeId| 构造器 | 说明 |
|---|---|
LineHeightRichStyle(float lineHeight,
boolean isScaleMode) |
A constructor used to create a
LineHeightRichStyle instance with the specified lineHeight
and adjustment mode. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
float |
getLineHeight() |
Obtains the line height.
|
boolean |
isScaleMode() |
Specifies whether ascent/descent is scaled to adjust the line height.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCapability, getRichStyleTypeIdpublic LineHeightRichStyle(float lineHeight,
boolean isScaleMode)
LineHeightRichStyle instance with the specified lineHeight
and adjustment mode.lineHeight - lineHeight Indicates the line height, in pixels.isScaleMode - Specifies whether to adjust the line height by scaling the ascent/descent in certain
proportion. The value true means to adjust the line height by scaling the ascent/descent,
and false means to adjust the line spacing.IllegalArgumentException - Throws this exception if the specified lineHeight is less than
0.public boolean isScaleMode()
true if ascent/descent is scaled; returns false otherwise.public float getLineHeight()