Text
Hierarchy
- Graphic
- Text
Index
Constructors
constructor
Parameters
options: TextOptions & GraphicOptions
Returns Text
Properties
publicoptionalcolor
readonlyinheritedid
publicoptionalmaxWidth
publicinheritedopacity
Gets or sets the opacity of the graphic, 0 is transparent, 1 is solid (opaque).
publicinheritedshowDebug
Gets or sets wether to show debug information about the graphic
publicoptionalinheritedtint
publicinheritedtransform
Accessors
publicinheritedflipHorizontal
Gets or sets the flipHorizontal, which will flip the graphic horizontally (across the y axis)
Returns boolean
Parameters
value: boolean
Returns void
publicinheritedflipVertical
Gets or sets the flipVertical, which will flip the graphic vertically (across the x axis)
Returns boolean
Parameters
value: boolean
Returns void
publicfont
Returns SpriteFont | Font
Parameters
font: SpriteFont | Font
Returns void
publicheight
Gets or sets the height of the graphic (always positive)
Returns number
publiclocalBounds
Gets a copy of the bounds in pixels occupied by the graphic on the the screen. This includes scale.
Returns BoundingBox
publicinheritedorigin
publicinheritedrotation
Gets or sets the rotation of the graphic
Returns number
Parameters
value: number
Returns void
publicinheritedscale
publictext
Returns string
Parameters
value: string
Returns void
publicwidth
Gets or sets the width of the graphic (always positive)
Returns number
Methods
publicclone
Returns a new instance of the graphic that has the same properties
Returns Text
publicinheritedcloneGraphicOptions
Returns GraphicOptions
publicinheriteddraw
Draw the whole graphic to the context including transform
Parameters
ex: ExcaliburGraphicsContext
The excalibur graphics context
x: number
y: number
Returns void
publicinheritedisStale
Returns boolean
Represent Text graphics in excalibur
Useful for in game labels, ui, or overlays