Interface

DrawAnnotationScope

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

Source set: Common
public interface DrawAnnotationScope : DrawScope

Receiver scope for DrawAnnotation 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
public val textLayoutResult: TextLayoutResult

Measured TextLayoutResult for the text being drawn.

start

Source set: Common
public val start: Int

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

end

Source set: Common
public val end: Int

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

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: