paint

abstract fun paint(graphics: Graphics2D, width: Int, height: Int, content: (Graphics2D, Int, Int) -> Unit)

Paints this decoration and, at the point of its own choosing, the content inside it.

Parameters

graphics

this decorator's own graphics, clipped to the area to paint; disposed when this returns.

width

the width of the area this decorator paints in.

height

the height of the area this decorator paints in.

content

paints everything inside this decorator into the graphics it is handed, which must be clipped; an ImageLayer recording is. Call it once, more than once, or not at all. The size it is given reaches the decorators inside this one; the component itself paints at its own bounds whatever size it is given.