drawRect

fun DrawScope.drawRect(paint: Paint, topLeft: Point2D, size: Dimension2D, style: DrawStyle = DrawStyle.Fill, @FloatRange(from = 0.0, to = 1.0) alpha: Float = 1.0f)

Draws a rectangle positioned at topLeft with size size.

Parameters

paint

the paint or color used to render the rectangle.

topLeft

coordinates of the top-left corner.

size

dimensions of the rectangle.

style

whether to fill or outline the rectangle.

alpha

the opacity to render with.