CanvasDrawScope

Class
Common
class CanvasDrawScope : DrawScope

Implementation of DrawScope that issues drawing commands into the specified canvas and bounds via CanvasDrawScope.draw

Functions

inline fun draw(
        density: Density,
        layoutDirection: LayoutDirection,
        canvas: Canvas,
        size: Size,
        block: DrawScope.() -> Unit,
    )

Draws into the provided Canvas with the commands specified in the lambda with this DrawScope as a receiver

Parameters

density Density used to assist in conversions of density independent pixels to raw pixels to draw
layoutDirection LayoutDirection of the layout being drawn in.
canvas target canvas to render into
size bounds relative to the current canvas translation in which the DrawScope should draw within
block lambda that is called to issue drawing commands on this DrawScope