drawText

fun drawText(context: DrawContext, drawStyle: DrawStyle, text: String, x: Double, y: Double): List<List<GlyphRectangle>>(source)

Draws a single line of text at the specified position using the provided drawing context and style.

Parameters

context

The drawing context that contains transformation matrices and rendering parameters.

drawStyle

The style to apply when drawing, including attributes like fill color, stroke color, and font map.

text

The string of text to be drawn.

x

The x-coordinate of the position where the text starts.

y

The y-coordinate of the position where the text starts.