fillRect

fun fillRect(x: Int, y: Int, width: Int, height: Int, color: Color): Image

Draws a filled rectangle on the image.

Return

A new Image object with the rectangle drawn on the image.

Parameters

x

The X coordinate of the top-left corner.

y

The Y coordinate of the top-left corner.

width

The width of the rectangle.

height

The height of the rectangle.

color

The color of the rectangle.