DrawAnnotation
Source set: Common
public fun DrawAnnotation(
drawBehind: (DrawAnnotationScope.() -> Unit)? = null,
drawOver: (DrawAnnotationScope.() -> Unit)? = null,
): DrawAnnotation
Creates an ad-hoc DrawAnnotation from drawBehind and drawOver lambdas.
Note: Lambda-backed DrawAnnotation instances capture closures and are not persisted by AnnotatedString.Saver. To define a reusable and saveable decoration, subclass DrawAnnotation instead.
Parameters
| drawBehind | optional callback run before painting the text glyphs |
| drawOver | optional callback run after painting the text glyphs |