Source set: Common
public class TextDecoration internal constructor(public val mask: Int)
Defines text decorations such as underline or line-through.
Functions
plus
Source set: Common
public operator fun plus(decoration: TextDecoration): TextDecoration
Combines this decoration with decoration.
contains
Source set: Common
public operator fun contains(other: TextDecoration): Boolean
Checks if this decoration contains other.
Parameters
| other | decoration to check. |
Members
Companion
Source set: Common
public companion object
Properties
None
Source set: Common
@Stable public val None: TextDecoration = TextDecoration(0x0)
Underline
Source set: Common
@Stable public val Underline: TextDecoration = TextDecoration(0x1)
Draws a horizontal line below the text.
LineThrough
Source set: Common
@Stable public val LineThrough: TextDecoration = TextDecoration(0x2)
Draws a horizontal line over the text.
Functions
combine
Source set: Common
public fun combine(decorations: List<TextDecoration>): TextDecoration
Combines multiple TextDecorations into a single decoration.
Parameters
| decorations | decorations to combine. |
valueOf
Source set: Common
public fun valueOf(mask: Int): TextDecoration
Creates a TextDecoration from a mask.
Attempts to avoid allocations for well-known decorations.
Parameters
| mask | bitmask of the decoration. |
Throws: IllegalArgumentException
if mask is invalid.