draw
inline fun draw(canvas: Canvas, size: Size, canvasState: CanvasState, block: CanvasScope.() -> Unit)
Draws into the provided Canvas with the commands specified in the lambda with this CanvasScope as a receiver.
Parameters
canvas
The target canvas to render into
size
The size relative to the current canvas transform in which the CanvasScope should draw within
canvasState
The canvas state, refer to the documentation of CanvasState to learn how to instantiate it properly.
block
The lambda that is called to issue drawing commands on this CanvasScope