DrawModifier¶
interface DrawModifier
A Modifier element that can participate in the draw chain for a composable node.
DrawModifiers wrap the node's normal render call, allowing effects to be drawn before (e.g. a background fill) or after (e.g. an overlay) the node's own content. The modifier calls ContentDrawScope.drawContent to trigger the wrapped render.
Implement draw inside the modifier to define the drawing logic.
Inheritors¶
Functions¶
draw¶
abstract fun ContentDrawScope.draw()
Performs custom drawing for this modifier.
Call ContentDrawScope.drawContent at the desired point to render the wrapped content. Omitting the call suppresses the node's normal rendering entirely.