draw

fun draw(context: DrawingContext, text: CharSequence, x: Float, y: Float, horizontalPosition: HorizontalPosition = HorizontalPosition.Center, verticalPosition: VerticalPosition = VerticalPosition.Center, maxWidth: Int = DEF_LAYOUT_SIZE, maxHeight: 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.

x

the x coordinate for the text.

y

the y coordinate for the text.

horizontalPosition

the horizontal position of the text, relative to x.

verticalPosition

the vertical position of the text, relative to y.

maxWidth

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

maxHeight

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

rotationDegrees

the rotation of the text (in degrees).