rect

fun Canvas.rect(x: Int, y: Int, width: Int, height: Int, color: Color = Color.BLACK)

Draws a rectangle outline on the canvas.

Parameters

x

The X coordinate of the rectangle top-left corner

y

The Y coordinate of the rectangle top-left corner

width

The width of the rectangle

height

The height of the rectangle

color

The color of the rectangle


fun Canvas.rect(x: Int, y: Int, width: Int, height: Int, lineThick: Int, color: Color = Color.BLACK)

Draws a rectangle outline on the canvas with specified line thickness.

Parameters

x

The X coordinate of the rectangle top-left corner

y

The Y coordinate of the rectangle top-left corner

width

The width of the rectangle

height

The height of the rectangle

lineThick

The thickness of the rectangle lines

color

The color of the rectangle