# MultiParagraph

Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/MultiParagraph.kt+class:androidx.compose.ui.text.MultiParagraph) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  class MultiParagraph
  ```

*** ** * ** ***

Lays out and renders multiple paragraphs at once. Unlike `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph`, supports multiple `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/ParagraphStyle`s in a given text.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#MultiParagraph(androidx.compose.ui.text.MultiParagraphIntrinsics,androidx.compose.ui.unit.Constraints,kotlin.Int,androidx.compose.ui.text.style.TextOverflow)( intrinsics: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraphIntrinsics, constraints: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow )` | Cmn |
| `[MultiParagraph](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#MultiParagraph(androidx.compose.ui.text.MultiParagraphIntrinsics,kotlin.Int,kotlin.Boolean,kotlin.Float))( intrinsics: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraphIntrinsics, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, ellipsis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` **This function is deprecated.** MultiParagraph that takes maximum allowed width is deprecated, pass constraints instead. | Cmn |
| `[MultiParagraph](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#MultiParagraph(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,androidx.compose.ui.unit.Constraints,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,kotlin.collections.List,kotlin.Int,androidx.compose.ui.text.style.TextOverflow))( annotatedString: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, constraints: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints, density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density, fontFamilyResolver: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily.Resolver, placeholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder>>, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow )` **This function is deprecated.** Constructor without a default locale is deprecated | Cmn |
| `[MultiParagraph](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#MultiParagraph(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,kotlin.collections.List,kotlin.Int,kotlin.Boolean,kotlin.Float,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.Font.ResourceLoader))( annotatedString: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, placeholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder>>, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, ellipsis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density, resourceLoader: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font.ResourceLoader )` **This function is deprecated.** Font.ResourceLoader is deprecated, use fontFamilyResolver instead | Cmn |
| `[MultiParagraph](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#MultiParagraph(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,kotlin.Float,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,kotlin.collections.List,kotlin.Int,kotlin.Boolean))( annotatedString: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density, fontFamilyResolver: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily.Resolver, placeholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder>>, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, ellipsis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` **This function is deprecated.** MultiParagraph that takes maximum allowed width is deprecated, pass constraints instead. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#MultiParagraph(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,androidx.compose.ui.unit.Constraints,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,androidx.compose.ui.text.intl.LocaleList,kotlin.collections.List,kotlin.Int,androidx.compose.ui.text.style.TextOverflow)( annotatedString: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, constraints: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints, density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density, fontFamilyResolver: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily.Resolver, defaultLocaleList: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/intl/LocaleList, placeholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder>>, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow )` Lays out a given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,androidx.compose.ui.unit.Constraints,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,androidx.compose.ui.text.intl.LocaleList,kotlin.collections.List,kotlin.Int,androidx.compose.ui.text.style.TextOverflow)` with the given constraints. | Cmn |

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#fillBoundingBoxes(androidx.compose.ui.text.TextRange,kotlin.FloatArray,kotlin.Int)( range: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextRange, array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html, arrayStart: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Fills the bounding boxes for characters provided in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#fillBoundingBoxes(androidx.compose.ui.text.TextRange,kotlin.FloatArray,kotlin.Int)` into `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#fillBoundingBoxes(androidx.compose.ui.text.TextRange,kotlin.FloatArray,kotlin.Int)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/ResolvedTextDirection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getBidiRunDirection(kotlin.Int)(offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Get the text direction of the character at the given offset. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getBoundingBox(kotlin.Int)(offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the bounding box as Rect of the character for given character offset. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getCursorRect(kotlin.Int)(offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns rectangle of the cursor area. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getHorizontalPosition(kotlin.Int,kotlin.Boolean)(offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, usePrimaryDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Compute the horizontal position where a newly inserted character at `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getHorizontalPosition(kotlin.Int,kotlin.Boolean)` would be. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getLineBaseline(kotlin.Int)(lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the distance from the top of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph` to the alphabetic baseline of the given line. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getLineBottom(kotlin.Int)(lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the bottom y coordinate of the given line. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getLineEnd(kotlin.Int,kotlin.Boolean)(lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, visibleEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns the end offset of the given line | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getLineForOffset(kotlin.Int)(offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the line number on which the specified text offset appears. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getLineForVerticalPosition(kotlin.Float)(vertical: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns line number closest to the given graphical vertical position. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getLineHeight(kotlin.Int)(lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the height of the given line. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getLineLeft(kotlin.Int)(lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the left x Coordinate of the given line. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getLineRight(kotlin.Int)(lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the right x Coordinate of the given line. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getLineStart(kotlin.Int)(lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the start offset of the given line, inclusive. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getLineTop(kotlin.Int)(lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the top y coordinate of the given line. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getLineWidth(kotlin.Int)(lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the width of the given line. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getOffsetForPosition(androidx.compose.ui.geometry.Offset)(position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Returns the character offset closest to the given graphical position. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/ResolvedTextDirection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getParagraphDirection(kotlin.Int)(offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Get the text direction of the paragraph containing the given offset. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getPathForRange(kotlin.Int,kotlin.Int)(start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns path that enclose the given text range. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextRange` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getRangeForRect(androidx.compose.ui.geometry.Rect,androidx.compose.ui.text.TextGranularity,androidx.compose.ui.text.TextInclusionStrategy)( rect: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect, granularity: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextGranularity, inclusionStrategy: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextInclusionStrategy )` Find the range of text which is inside the specified `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getRangeForRect(androidx.compose.ui.geometry.Rect,androidx.compose.ui.text.TextGranularity,androidx.compose.ui.text.TextInclusionStrategy)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextRange` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getWordBoundary(kotlin.Int)(offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the TextRange of the word at the given character offset. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#isLineEllipsized(kotlin.Int)(lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns true if the given line is ellipsized, otherwise returns false. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#paint(androidx.compose.ui.graphics.Canvas,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.BlendMode)( canvas: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow?, decoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Paint the paragraphs to canvas. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#paint(androidx.compose.ui.graphics.Canvas,androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.BlendMode)( canvas: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas, brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow?, decoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Paint the paragraphs to canvas. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#didExceedMaxLines()` True if there is more vertical content, but the text was truncated, either because we reached `maxLines` lines of text or because the `maxLines` was null, `ellipsis` was not null, and one of the lines exceeded the width constraint. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#firstBaseline()` The distance from the top of the paragraph to the alphabetic baseline of the first line, in logical pixels. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#height()` The amount of vertical space this paragraph occupies. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraphIntrinsics` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#intrinsics()` previously calculated text intrinsics | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#lastBaseline()` The distance from the top of the paragraph to the alphabetic baseline of the first line, in logical pixels. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#lineCount()` The total number of lines in the text. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#maxIntrinsicWidth()` Returns the smallest width beyond which increasing the width never decreases the height. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#maxLines()` the maximum number of lines that the text can have | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#minIntrinsicWidth()` The width for text if all soft wrap opportunities were taken. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect?>` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#placeholderRects()` The bounding boxes reserved for the input placeholders in this MultiParagraph. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#width()` The amount of horizontal space this paragraph occupies. | Cmn |

## Public constructors

### MultiParagraph

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
MultiParagraph(
    intrinsics: MultiParagraphIntrinsics,
    constraints: Constraints,
    maxLines: Int = DefaultMaxLines,
    overflow: TextOverflow = TextOverflow.Clip
)
```

| Parameters |
|---|---|
| `intrinsics: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraphIntrinsics` | previously calculated text intrinsics |
| `constraints: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints` | how wide and tall the text is allowed to be. `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints#maxWidth()` will define the width of the MultiParagraph. `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints#maxHeight()` helps defining the number of lines that fit with ellipsis is true. Minimum components of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints` object are no-op. |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = DefaultMaxLines` | the maximum number of lines that the text can have |
| `overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow = TextOverflow.Clip` | configures how visual overflow is handled. Ellipsis is applied only when `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#maxLines()` is set |

### MultiParagraph

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
[MultiParagraph](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#MultiParagraph(androidx.compose.ui.text.MultiParagraphIntrinsics,kotlin.Int,kotlin.Boolean,kotlin.Float))(
    intrinsics: MultiParagraphIntrinsics,
    maxLines: Int = DefaultMaxLines,
    ellipsis: Boolean = false,
    width: Float
)
```

> [!CAUTION]
> **This function is deprecated.**   
> MultiParagraph that takes maximum allowed width is deprecated, pass constraints instead, use this instead:
>
> ```kotlin
> MultiParagraph(intrinsics, Constraints(maxWidth = ceil(width).toInt()), maxLines, ellipsis)
> ```

Lays out and renders multiple paragraphs at once. Unlike `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph`, supports multiple `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/ParagraphStyle`s in a given text.

| Parameters |
|---|---|
| `intrinsics: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraphIntrinsics` | previously calculated text intrinsics |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = DefaultMaxLines` | the maximum number of lines that the text can have |
| `ellipsis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | whether to ellipsize text, applied only when `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.MultiParagraphIntrinsics,kotlin.Int,kotlin.Boolean,kotlin.Float)` is set |
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | how wide the text is allowed to be |

### MultiParagraph

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0) Deprecated in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.13.0-rc01)

```
[MultiParagraph](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#MultiParagraph(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,androidx.compose.ui.unit.Constraints,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,kotlin.collections.List,kotlin.Int,androidx.compose.ui.text.style.TextOverflow))(
    annotatedString: AnnotatedString,
    style: TextStyle,
    constraints: Constraints,
    density: Density,
    fontFamilyResolver: FontFamily.Resolver,
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
    maxLines: Int = Int.MAX_VALUE,
    overflow: TextOverflow = TextOverflow.Clip
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Constructor without a default locale is deprecated

Lays out a given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,androidx.compose.ui.unit.Constraints,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,kotlin.collections.List,kotlin.Int,androidx.compose.ui.text.style.TextOverflow)` with the given constraints. Unlike a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph` can handle a text what has multiple paragraph styles.

| Parameters |
|---|---|
| `annotatedString: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` | the text to be laid out |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` to be applied to the whole text |
| `constraints: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints` | how wide and tall the text is allowed to be. `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints#maxWidth()` will define the width of the MultiParagraph. `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints#maxHeight()` helps defining the number of lines that fit with ellipsis is true. Minimum components of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints` object are no-op. |
| `density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density` | density of the device |
| `fontFamilyResolver: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily.Resolver` | to be used to load the font given in `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle`s |
| `placeholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder>> = listOf()` | a list of `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder`s that specify ranges of text which will be skipped during layout and replaced with `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder`. It's required that the range of each `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder` doesn't cross paragraph boundary, otherwise `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` is thrown. |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = Int.MAX_VALUE` | the maximum number of lines that the text can have |
| `overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow = TextOverflow.Clip` | configures how visual overflow is handled. Ellipsis is applied only when `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,androidx.compose.ui.unit.Constraints,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,kotlin.collections.List,kotlin.Int,androidx.compose.ui.text.style.TextOverflow)` is set |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/ParagraphStyle#textDirection()` is not set, or any of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,androidx.compose.ui.unit.Constraints,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,kotlin.collections.List,kotlin.Int,androidx.compose.ui.text.style.TextOverflow)` crosses paragraph boundary. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder` |   |

### MultiParagraph

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
[MultiParagraph](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#MultiParagraph(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,kotlin.collections.List,kotlin.Int,kotlin.Boolean,kotlin.Float,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.Font.ResourceLoader))(
    annotatedString: AnnotatedString,
    style: TextStyle,
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
    maxLines: Int = Int.MAX_VALUE,
    ellipsis: Boolean = false,
    width: Float,
    density: Density,
    resourceLoader: Font.ResourceLoader
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Font.ResourceLoader is deprecated, use fontFamilyResolver instead, use this instead:
>
> ```kotlin
> MultiParagraph(annotatedString, style, placeholders, maxLines, ellipsis, width, density, fontFamilyResolver)
> ```

Lays out a given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,kotlin.collections.List,kotlin.Int,kotlin.Boolean,kotlin.Float,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.Font.ResourceLoader)` with the given constraints. Unlike a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph` can handle a text what has multiple paragraph styles.

| Parameters |
|---|---|
| `annotatedString: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` | the text to be laid out |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` to be applied to the whole text |
| `placeholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder>> = listOf()` | a list of `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder`s that specify ranges of text which will be skipped during layout and replaced with `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder`. It's required that the range of each `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder` doesn't cross paragraph boundary, otherwise `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` is thrown. |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = Int.MAX_VALUE` | the maximum number of lines that the text can have |
| `ellipsis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | whether to ellipsize text, applied only when `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,kotlin.collections.List,kotlin.Int,kotlin.Boolean,kotlin.Float,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.Font.ResourceLoader)` is set |
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | how wide the text is allowed to be |
| `density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density` | density of the device |
| `resourceLoader: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font.ResourceLoader` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/Font.ResourceLoader` to be used to load the font given in `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle`s |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/ParagraphStyle#textDirection()` is not set, or any of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,kotlin.collections.List,kotlin.Int,kotlin.Boolean,kotlin.Float,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.Font.ResourceLoader)` crosses paragraph boundary. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder` |   |

### MultiParagraph

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
[MultiParagraph](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#MultiParagraph(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,kotlin.Float,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,kotlin.collections.List,kotlin.Int,kotlin.Boolean))(
    annotatedString: AnnotatedString,
    style: TextStyle,
    width: Float,
    density: Density,
    fontFamilyResolver: FontFamily.Resolver,
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
    maxLines: Int = Int.MAX_VALUE,
    ellipsis: Boolean = false
)
```

> [!CAUTION]
> **This function is deprecated.**   
> MultiParagraph that takes maximum allowed width is deprecated, pass constraints instead, use this instead:
>
> ```kotlin
> MultiParagraph(annotatedString, style, Constraints(maxWidth = ceil(width).toInt()), density, fontFamilyResolver, placeholders, maxLines, ellipsis)
> ```

Lays out a given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,kotlin.Float,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,kotlin.collections.List,kotlin.Int,kotlin.Boolean)` with the given constraints. Unlike a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph` can handle a text what has multiple paragraph styles.

| Parameters |
|---|---|
| `annotatedString: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` | the text to be laid out |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` to be applied to the whole text |
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | how wide the text is allowed to be |
| `density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density` | density of the device |
| `fontFamilyResolver: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily.Resolver` | to be used to load the font given in `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle`s |
| `placeholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder>> = listOf()` | a list of `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder`s that specify ranges of text which will be skipped during layout and replaced with `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder`. It's required that the range of each `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder` doesn't cross paragraph boundary, otherwise `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` is thrown. |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = Int.MAX_VALUE` | the maximum number of lines that the text can have |
| `ellipsis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | whether to ellipsize text, applied only when `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,kotlin.Float,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,kotlin.collections.List,kotlin.Int,kotlin.Boolean)` is set |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/ParagraphStyle#textDirection()` is not set, or any of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,kotlin.Float,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,kotlin.collections.List,kotlin.Int,kotlin.Boolean)` crosses paragraph boundary. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder` |   |

### MultiParagraph

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.13.0-rc01)

```
MultiParagraph(
    annotatedString: AnnotatedString,
    style: TextStyle,
    constraints: Constraints,
    density: Density,
    fontFamilyResolver: FontFamily.Resolver,
    defaultLocaleList: LocaleList,
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
    maxLines: Int = Int.MAX_VALUE,
    overflow: TextOverflow = TextOverflow.Clip
)
```

Lays out a given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,androidx.compose.ui.unit.Constraints,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,androidx.compose.ui.text.intl.LocaleList,kotlin.collections.List,kotlin.Int,androidx.compose.ui.text.style.TextOverflow)` with the given constraints. Unlike a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph` can handle a text what has multiple paragraph styles.

| Parameters |
|---|---|
| `annotatedString: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` | the text to be laid out |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` to be applied to the whole text |
| `constraints: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints` | how wide and tall the text is allowed to be. `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints#maxWidth()` will define the width of the MultiParagraph. `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints#maxHeight()` helps defining the number of lines that fit with ellipsis is true. Minimum components of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints` object are no-op. |
| `density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density` | density of the device |
| `fontFamilyResolver: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily.Resolver` | to be used to load the font given in `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle`s |
| `defaultLocaleList: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/intl/LocaleList` | the default `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/intl/LocaleList` to be used if `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,androidx.compose.ui.unit.Constraints,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,androidx.compose.ui.text.intl.LocaleList,kotlin.collections.List,kotlin.Int,androidx.compose.ui.text.style.TextOverflow)` doesn't specify one |
| `placeholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder>> = listOf()` | a list of `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder`s that specify ranges of text which will be skipped during layout and replaced with `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder`. It's required that the range of each `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder` doesn't cross paragraph boundary, otherwise `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` is thrown. |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = Int.MAX_VALUE` | the maximum number of lines that the text can have |
| `overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow = TextOverflow.Clip` | configures how visual overflow is handled. Ellipsis is applied only when `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,androidx.compose.ui.unit.Constraints,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,androidx.compose.ui.text.intl.LocaleList,kotlin.collections.List,kotlin.Int,androidx.compose.ui.text.style.TextOverflow)` is set |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/ParagraphStyle#textDirection()` is not set, or any of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.text.TextStyle,androidx.compose.ui.unit.Constraints,androidx.compose.ui.unit.Density,androidx.compose.ui.text.font.FontFamily.Resolver,androidx.compose.ui.text.intl.LocaleList,kotlin.collections.List,kotlin.Int,androidx.compose.ui.text.style.TextOverflow)` crosses paragraph boundary. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder` |   |

## Public functions

### fillBoundingBoxes

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun fillBoundingBoxes(
    range: TextRange,
    array: FloatArray,
    arrayStart: @IntRange(from = 0) Int
): FloatArray
```

Fills the bounding boxes for characters provided in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#fillBoundingBoxes(androidx.compose.ui.text.TextRange,kotlin.FloatArray,kotlin.Int)` into `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#fillBoundingBoxes(androidx.compose.ui.text.TextRange,kotlin.FloatArray,kotlin.Int)`. The array is filled starting from `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#fillBoundingBoxes(androidx.compose.ui.text.TextRange,kotlin.FloatArray,kotlin.Int)` (inclusive). The coordinates are in local text layout coordinates.

The returned information consists of left/right of a character; line top and bottom for the same character.

For the grapheme consists of multiple code points, e.g. ligatures, combining marks, the first character has the total width and the remaining are returned as zero-width.

The array divided into segments of four where each index in that segment represents left, top, right, bottom of the character.

The size of the provided `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#fillBoundingBoxes(androidx.compose.ui.text.TextRange,kotlin.FloatArray,kotlin.Int)` should be greater or equal than the four times \* `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextRange` length.

The final order of characters in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#fillBoundingBoxes(androidx.compose.ui.text.TextRange,kotlin.FloatArray,kotlin.Int)` is from `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextRange#min()` to `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextRange#max()`.

| Parameters |
|---|---|
| `range: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextRange` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextRange` representing the start and end indices in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph`. |
| `array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html` | the array to fill in the values. The array divided into segments of four where each index in that segment represents left, top, right, bottom of the character. |
| `arrayStart: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the inclusive start index in the array where the function will start filling in the values from |

### getBidiRunDirection

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getBidiRunDirection(offset: Int): ResolvedTextDirection
```

Get the text direction of the character at the given offset.

### getBoundingBox

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getBoundingBox(offset: Int): Rect
```

Returns the bounding box as Rect of the character for given character offset. Rect includes the top, bottom, left and right of a character.

### getCursorRect

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getCursorRect(offset: Int): Rect
```

Returns rectangle of the cursor area.

### getHorizontalPosition

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getHorizontalPosition(offset: Int, usePrimaryDirection: Boolean): Float
```

Compute the horizontal position where a newly inserted character at `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getHorizontalPosition(kotlin.Int,kotlin.Boolean)` would be.

If the inserted character at `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getHorizontalPosition(kotlin.Int,kotlin.Boolean)` is within a LTR/RTL run, the returned position will be the left(right) edge of the character.

```kotlin
For example:
    Paragraph's direction is LTR.
    Text in logic order:               L0 L1 L2 R3 R4 R5
    Text in visual order:              L0 L1 L2 R5 R4 R3
        position of the offset(2):          |
        position of the offset(4):                   |
```

However, when the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getHorizontalPosition(kotlin.Int,kotlin.Boolean)` is at the BiDi transition offset, there will be two possible visual positions, which depends on the direction of the inserted character.

```kotlin
For example:
    Paragraph's direction is LTR.
    Text in logic order:               L0 L1 L2 R3 R4 R5
    Text in visual order:              L0 L1 L2 R5 R4 R3
        position of the offset(3):             |           (The inserted character is LTR)
                                                        |  (The inserted character is RTL)
```

In this case, `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getHorizontalPosition(kotlin.Int,kotlin.Boolean)` will be used to resolve the ambiguity. If true, the inserted character's direction is assumed to be the same as Paragraph's direction. Otherwise, the inserted character's direction is assumed to be the opposite of the Paragraph's direction.

```kotlin
For example:
    Paragraph's direction is LTR.
    Text in logic order:               L0 L1 L2 R3 R4 R5
    Text in visual order:              L0 L1 L2 R5 R4 R3
        position of the offset(3):             |           (usePrimaryDirection is true)
                                                        |  (usePrimaryDirection is false)
```

This method is useful to compute cursor position.

| Parameters |
|---|---|
| `offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the offset of the character, in the range of 0, length. |
| `usePrimaryDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the paragraph direction is respected when `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getHorizontalPosition(kotlin.Int,kotlin.Boolean)` points to a BiDi transition point. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | a float number representing the horizontal position in the unit of pixel. |

### getLineBaseline

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
fun getLineBaseline(lineIndex: Int): Float
```

Returns the distance from the top of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph` to the alphabetic baseline of the given line.

### getLineBottom

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getLineBottom(lineIndex: Int): Float
```

Returns the bottom y coordinate of the given line.

### getLineEnd

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getLineEnd(lineIndex: Int, visibleEnd: Boolean = false): Int
```

Returns the end offset of the given line

Characters being ellipsized are treated as invisible characters. So that if visibleEnd is false, it will return line end including the ellipsized characters and vice verse.

| Parameters |
|---|---|
| `lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the line number |
| `visibleEnd: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | if true, the returned line end will not count trailing whitespaces or linefeed characters. Otherwise, this function will return the logical line end. By default it's false. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | an exclusive end offset of the line. |

### getLineForOffset

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getLineForOffset(offset: Int): Int
```

Returns the line number on which the specified text offset appears. If you ask for a position before 0, you get 0; if you ask for a position beyond the end of the text, you get the last line.

### getLineForVerticalPosition

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getLineForVerticalPosition(vertical: Float): Int
```

Returns line number closest to the given graphical vertical position. If you ask for a vertical position before 0, you get 0; if you ask for a vertical position beyond the last line, you get the last line.

### getLineHeight

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getLineHeight(lineIndex: Int): Float
```

Returns the height of the given line.

### getLineLeft

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getLineLeft(lineIndex: Int): Float
```

Returns the left x Coordinate of the given line.

### getLineRight

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getLineRight(lineIndex: Int): Float
```

Returns the right x Coordinate of the given line.

### getLineStart

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getLineStart(lineIndex: Int): Int
```

Returns the start offset of the given line, inclusive.

### getLineTop

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getLineTop(lineIndex: Int): Float
```

Returns the top y coordinate of the given line.

### getLineWidth

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getLineWidth(lineIndex: Int): Float
```

Returns the width of the given line.

### getOffsetForPosition

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun getOffsetForPosition(position: Offset): Int
```

Returns the character offset closest to the given graphical position.

### getParagraphDirection

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getParagraphDirection(offset: Int): ResolvedTextDirection
```

Get the text direction of the paragraph containing the given offset.

### getPathForRange

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getPathForRange(start: Int, end: Int): Path
```

Returns path that enclose the given text range.

### getRangeForRect

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun getRangeForRect(
    rect: Rect,
    granularity: TextGranularity,
    inclusionStrategy: TextInclusionStrategy
): TextRange
```

Find the range of text which is inside the specified `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getRangeForRect(androidx.compose.ui.geometry.Rect,androidx.compose.ui.text.TextGranularity,androidx.compose.ui.text.TextInclusionStrategy)`. This method will break text into small text segments based on the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getRangeForRect(androidx.compose.ui.geometry.Rect,androidx.compose.ui.text.TextGranularity,androidx.compose.ui.text.TextInclusionStrategy)` such as character or word. It also support different `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getRangeForRect(androidx.compose.ui.geometry.Rect,androidx.compose.ui.text.TextGranularity,androidx.compose.ui.text.TextInclusionStrategy)`, which determines when a small text segments is considered as inside the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getRangeForRect(androidx.compose.ui.geometry.Rect,androidx.compose.ui.text.TextGranularity,androidx.compose.ui.text.TextInclusionStrategy)`. Note that the word/character breaking is both operating system and language dependent. In the certain cases, the text may be break into smaller segments than the specified the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getRangeForRect(androidx.compose.ui.geometry.Rect,androidx.compose.ui.text.TextGranularity,androidx.compose.ui.text.TextInclusionStrategy)`. If a text segment spans multiple lines or multiple directional runs (e.g. a hyphenated word), the text segment is divided into pieces at the line and run breaks, then the text segment is considered to be inside the area if any of its pieces are inside the area.

| Parameters |
|---|---|
| `rect: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | the rectangle area in which the text range will be found. |
| `granularity: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextGranularity` | the granularity of the text, it controls how text is segmented. |
| `inclusionStrategy: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextInclusionStrategy` | the strategy that determines whether a range of text's bounds is inside the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getRangeForRect(androidx.compose.ui.geometry.Rect,androidx.compose.ui.text.TextGranularity,androidx.compose.ui.text.TextInclusionStrategy)` or not. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextRange` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextRange` that is inside the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#getRangeForRect(androidx.compose.ui.geometry.Rect,androidx.compose.ui.text.TextGranularity,androidx.compose.ui.text.TextInclusionStrategy)`, or `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextRange#Zero()` if no text is found. |

### getWordBoundary

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun getWordBoundary(offset: Int): TextRange
```

Returns the TextRange of the word at the given character offset. Characters not part of a word, such as spaces, symbols, and punctuation, have word breaks on both sides. In such cases, this method will return TextRange(offset, offset+1). Word boundaries are defined more precisely in Unicode Standard Annex #29 http://www.unicode.org/reports/tr29/#Word_Boundaries

### isLineEllipsized

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun isLineEllipsized(lineIndex: Int): Boolean
```

Returns true if the given line is ellipsized, otherwise returns false.

| Parameters |
|---|---|
| `lineIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | a 0 based line index |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the given line is ellipsized, otherwise false |

### paint

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun paint(
    canvas: Canvas,
    color: Color = Color.Unspecified,
    shadow: Shadow? = null,
    decoration: TextDecoration? = null,
    drawStyle: DrawStyle? = null,
    blendMode: BlendMode = DrawScope.DefaultBlendMode
): Unit
```

Paint the paragraphs to canvas.

### paint

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun paint(
    canvas: Canvas,
    brush: Brush,
    alpha: Float = Float.NaN,
    shadow: Shadow? = null,
    decoration: TextDecoration? = null,
    drawStyle: DrawStyle? = null,
    blendMode: BlendMode = DrawScope.DefaultBlendMode
): Unit
```

Paint the paragraphs to canvas.

## Public properties

### didExceedMaxLines

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val didExceedMaxLines: Boolean
```

True if there is more vertical content, but the text was truncated, either because we reached `maxLines` lines of text or because the `maxLines` was null, `ellipsis` was not null, and one of the lines exceeded the width constraint.

### firstBaseline

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val firstBaseline: Float
```

The distance from the top of the paragraph to the alphabetic baseline of the first line, in logical pixels.

### height

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val height: Float
```

The amount of vertical space this paragraph occupies.

Valid only after layout has been called.

### intrinsics

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val intrinsics: MultiParagraphIntrinsics
```

previously calculated text intrinsics

### lastBaseline

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val lastBaseline: Float
```

The distance from the top of the paragraph to the alphabetic baseline of the first line, in logical pixels.

### lineCount

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val lineCount: Int
```

The total number of lines in the text.

### maxIntrinsicWidth

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val maxIntrinsicWidth: Float
```

Returns the smallest width beyond which increasing the width never decreases the height.

### maxLines

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val maxLines: Int
```

the maximum number of lines that the text can have

### minIntrinsicWidth

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val minIntrinsicWidth: Float
```

The width for text if all soft wrap opportunities were taken.

### placeholderRects

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val placeholderRects: List<Rect?>
```

The bounding boxes reserved for the input placeholders in this MultiParagraph. Their locations are relative to this MultiParagraph's coordinate. The order of this list corresponds to that of input placeholders. Notice that `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` in `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/MultiParagraph#placeholderRects()` is nullable. When `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` is null, it indicates that the corresponding `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder` is ellipsized.

### width

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val width: Float
```

The amount of horizontal space this paragraph occupies.