drawText

fun drawText(x: Int, y: Int, text: String, fontSize: Int, color: Color): Image

Draws text on the image at the specified position, with the given font size and color.

Return

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

Parameters

x

The X coordinate of the text position.

y

The Y coordinate of the text position.

text

The text string to draw.

fontSize

The font size of the text.

color

The color of the text.