public class WarpOffset internal constructor(internal val option: Byte)
Used to specify if we want to warp the text, and if so, the offset for warping. Warping the text will cause each character to be modified in shape so that it is thinner when it is closer to the center of the center of the screen and wider when it's further away. This also makes adjacent characters share a line, so this is particularly useful for cursive fonts. When warping is active, this parameter specifies which horizontal line of the text will keep its width.
Properties
isSpecified
public inline val isSpecified: Boolean
false when this is WarpOffset.Unspecified.
isUnspecified
public inline val isUnspecified: Boolean
true when this is WarpOffset.Unspecified.
Functions
toString
override fun toString(): String
takeOrElse
public inline fun takeOrElse(block: () -> WarpOffset): WarpOffset
If this WarpOffset isSpecified then this is returned, otherwise block is executed and its result is returned.
Members
Companion
public companion object
Properties
Unspecified
public val Unspecified: WarpOffset = WarpOffset(0)
Unspecified, used for merging styles
None
public val None: WarpOffset = WarpOffset(1)
Do not warp, use the standard Android rendering
Baseline
public val Baseline: WarpOffset = WarpOffset(2)
Warp using the baseline of the text.
HalfAscent
public val HalfAscent: WarpOffset = WarpOffset(3)
Warp using half the ascent of the text.
HalfOpticalHeight
public val HalfOpticalHeight: WarpOffset = WarpOffset(4)
Warp using the middle point between ascent and descent of the text. This is the default
Ascent
public val Ascent: WarpOffset = WarpOffset(5)
Warp using the ascent of the text.
Descent
public val Descent: WarpOffset = WarpOffset(6)
Warp using the descent of the text.