drawWithContent

Draws onDraw into the component's area, letting the block decide when the content declared after this modifier is painted by calling ContentDrawScope.drawContent.

Snapshot state read in onDraw repaints the component when it changes. The component must paint through Decoratable, as every drawing modifier does.

Return

this chain with the drawing block declared on it.

Parameters

onDraw

the drawing block, called on the event dispatch thread with a ContentDrawScope receiver.