A Text-instance represents a continuous text (with line breaks) that can be added to a TextProgram to display it.

Constructor

new(x:Int, y:Int, text:String, ?textOptions:TextOptions)

Creates a new Text instance.

Parameters:

x

horizontal position of the top left character

y

vertical position of the top left character

text

the String representation of the text (can contain "\n" linebreaks)

textOptions

the TextOptions

Variables

@:value(null)elements:Array<TextElement> = null

Contains the elements (letter glyphes) of the text.

@:value(0)x:Int = 0

Horizontal position of the top left character

y:Int

Vertical position of the top left character

text:String

The String-representation of the text

@:value(null)options:TextOptions = null

The TextOptions values to define colors and spacing for the text. If a property is null it is using the value from TextProgram.defaultOptions.

fgColor:Null<Color>

Gets or sets the options.fgColor property

bgColor:Null<Color>

Gets or sets the options.bgColor property.

letterWidth:Null<Int>

Gets or sets the options.letterWidth property.

letterHeight:Null<Int>

Gets or sets the options.letterHeight property.

letterSpace:Null<Int>

Gets or sets the options.letterSpace property.

lineSpace:Null<Int>

Gets or sets the options.lineSpace property.

zIndex:Null<Int>

Gets or sets the options.zIndex property.