---
title: "TextDecoration"
description: "Defines a horizontal line to be drawn on the text."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
class TextDecoration internal constructor(val mask: Int)
```


Defines a horizontal line to be drawn on the text.


## Functions

```kotlin
operator fun plus(decoration: TextDecoration): TextDecoration
```


Creates a decoration that includes both of the TextDecorations.


```kotlin
operator fun contains(other: TextDecoration): Boolean
```


Check whether this `TextDecoration` contains the given decoration.

#### Parameters

| | |
| --- | --- |
| other | The `TextDecoration` to be checked. |



## Companion Object

#### Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val None: TextDecoration
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
val Underline: TextDecoration
```


Draws a horizontal line below the text.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val LineThrough: TextDecoration
```


Draws a horizontal line over the text.



#### Methods

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun combine(decorations: List<TextDecoration>): TextDecoration
```


Creates a decoration that includes all the given decorations.

#### Parameters

| | |
| --- | --- |
| decorations | The decorations to be added |




<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun valueOf(mask: Int): TextDecoration
```


Construct a TextDecoration instance from the underlying `TextDecoration.mask`. This
method will attempt to avoid allocations in cases of well known decorations, but is not
guaranteed to not allocate.

#### Parameters

| | |
| --- | --- |
| mask | The integer representation of the TextDecoration. |






