# DrawAnnotationScope

> Receiver scope for [DrawAnnotation] callbacks that draws behind or over a character range in laid-out text.

## API Reference

> Source set: Common

```kotlin
public interface DrawAnnotationScope : DrawScope
```

Receiver scope for [DrawAnnotation](https://composables.com/jetpack-compose/androidx.compose.ui/ui-text/functions/DrawAnnotation/api.md) callbacks that draws behind or over a character range in
laid-out text.

Aligns the `DrawScope` coordinate space with the text layout origin and exposes the measured
`textLayoutResult` along with the resolved ``start, end)` character offsets for the annotated
range. Call [TextLayoutResult.getBoundingBoxesForRange` or `TextLayoutResult.fillPathForRange`
with `start` and `end` to obtain per-line bounding boxes or contour paths.

## Properties

### textLayoutResult

> Source set: Common

```kotlin
public val textLayoutResult: TextLayoutResult
```

Measured [TextLayoutResult](https://composables.com/jetpack-compose/androidx.compose.ui/ui-text/classes/TextLayoutResult/api.md) for the text being drawn.

### start

> Source set: Common

```kotlin
public val start: Int
```

Inclusive start character offset of the annotated range, clamped to the text length.

### end

> Source set: Common

```kotlin
public val end: Int
```

Exclusive end character offset of the annotated range, clamped to ``start, text.length``.
