Class

CurvedTextStyle.WarpOffset

Used to specify if we want to warp the text, and if so, the offset for warping.

Source set: Android
public value 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

Source set: Android
public inline val isSpecified: Boolean

false when this is WarpOffset.Unspecified.

isUnspecified

Source set: Android
public inline val isUnspecified: Boolean

true when this is WarpOffset.Unspecified.

Functions

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.

Companion Object

Properties

Source set: Android
public val Unspecified: WarpOffset

Unspecified, used for merging styles

Source set: Android
public val None: WarpOffset

Do not warp, use the standard Android rendering

Source set: Android
public val Baseline: WarpOffset

Warp using the baseline of the text.

Source set: Android
public val HalfAscent: WarpOffset

Warp using half the ascent of the text.

Source set: Android
public val HalfOpticalHeight: WarpOffset

Warp using the middle point between ascent and descent of the text. This is the default

Source set: Android
public val Ascent: WarpOffset

Warp using the ascent of the text.

Source set: Android
public val Descent: WarpOffset

Warp using the descent of the text.

Last updated: