TextFormat
public class
loom2d.display.TextFormat
Description
Describe the format of some text for the Graphics class. Pass to Graphics.textFormat() to specify the active format.
API overview
Constructor
TextFormat
(
font: String
= null
,
size: Number
=
,
color: Number
=
,
bold: Object
= null
)
Describe a font format by specifying font name, indicating size, color, and if it's bolded
Attributes
Public attributes
| align: Number |
Align as specified in TextAlign |
| color: Number |
RGB color of the text |
| font: String |
What font should we use with this text format? The name is one previously passed to TextFormat.load() |
| letterSpacing: Number |
Add additional spacing between letters |
| lineHeight: Number |
Add additional space between lines (in pixels) |
| size: Number |
Size of text in pixels |
Constructor
TextFormat ( font: String = null , size: Number = , color: Number = , bold: Object = null )
Describe a font format by specifying font name, indicating size, color, and if it's bolded. If you don't specify a property, it remains unspecified and doesn't alter render state when the format is passed via textFormat().
Attributes
font: String
What font should we use with this text format? The name is one previously passed to TextFormat.load().
Functions
getFullTypeName
(): String
Inherited from Object
native
Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.
Returns
| String | fully qualified type name of the Object. |
getType
(): Type
Inherited from Object
native
Gets the Type that describes the Object.
Returns
| Type | The Type that describes the object. |
getTypeName
(): String
Inherited from Object
native
Gets the type name of the Object.
Returns
| String | type name of the Object. |