TextPaintItem

class TextPaintItem(getText: () -> String?) : PaintItem

Types

Companion
Link copied to clipboard
object Companion

Functions

draw
Link copied to clipboard
open override fun draw(graphics: Graphics, x: Int, y: Int)
height
Link copied to clipboard
open override fun height(graphics: Graphics): Float
textSize
Link copied to clipboard
open override fun textSize(): Float?
width
Link copied to clipboard
open override fun width(graphics: Graphics): Float

Since width gets called before draw, we can call the text here Additionally, if we wrap the call in a string we get "null" rather than nothing This allows people to easily debug entities that result to null

withAlign
Link copied to clipboard
fun withAlign(align: Boolean): TextPaintItem
withTextColor
Link copied to clipboard
fun withTextColor(color: Int): TextPaintItem
withTextSize
Link copied to clipboard
fun withTextSize(textSize: Float): TextPaintItem

Properties

align
Link copied to clipboard
open override var align: Boolean = true
getText
Link copied to clipboard
val getText: () -> String?