drawText

fun drawText(context: DrawContext, text: CharSequence, textX: Float, textY: Float, horizontalPosition: HorizontalPosition = HorizontalPosition.Center, verticalPosition: VerticalPosition = VerticalPosition.Center, maxTextWidth: Int = DEF_LAYOUT_SIZE, maxTextHeight: Int = DEF_LAYOUT_SIZE, rotationDegrees: Float = 0.0f)

Uses Canvas to draw this TextComponent.

Parameters

context

holds environment data.

text

the text to be drawn.

textX

the x coordinate for the text.

textY

the y coordinate for the text.

horizontalPosition

the horizontal position of the text, relative to textX.

verticalPosition

the vertical position of the text, relative to textY.

maxTextWidth

the maximum width available for the text (in pixels).

maxTextHeight

the maximum height available for the text (in pixels).

rotationDegrees

the rotation of the text (in degrees).