draw
fun draw(context: DrawingContext, text: CharSequence, x: Float, y: Float, horizontalPosition: Position.Horizontal = Position.Horizontal.Center, verticalPosition: Position.Vertical = Position.Vertical.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.
horizontal Position
the horizontal position of the text, relative to x.
vertical Position
the vertical position of the text, relative to y.
max Width
the maximum width available for the text (in pixels).
max Height
the maximum height available for the text (in pixels).
rotation Degrees
the rotation of the text (in degrees).