🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

CurvedTextStyle.WarpOffset

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

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

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

toString

Source set: Android
override fun toString(): String

takeOrElse

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

Source set: Android
public companion object

Properties

Unspecified

Source set: Android
public val Unspecified: WarpOffset = WarpOffset(0)

Unspecified, used for merging styles

None

Source set: Android
public val None: WarpOffset = WarpOffset(1)

Do not warp, use the standard Android rendering

Baseline

Source set: Android
public val Baseline: WarpOffset = WarpOffset(2)

Warp using the baseline of the text.

HalfAscent

Source set: Android
public val HalfAscent: WarpOffset = WarpOffset(3)

Warp using half the ascent of the text.

HalfOpticalHeight

Source set: Android
public val HalfOpticalHeight: WarpOffset = WarpOffset(4)

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

Ascent

Source set: Android
public val Ascent: WarpOffset = WarpOffset(5)

Warp using the ascent of the text.

Descent

Source set: Android
public val Descent: WarpOffset = WarpOffset(6)

Warp using the descent of the text.

Content updated: