DebugText
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Returns DebugText
Properties
publicreadonlyfontSheet
base64 font
publicsize
Accessors
publicbackgroundColor
Returns Color
publicborderColor
Returns Color
publicforegroundColor
Returns Color
Methods
publicload
Returns Promise<void>
publicmeasureText
Measures the pixel dimensions of
textas it would be drawn by DebugText.write, accounting for the optional scale factor.Parameters
text: string
Text to measure
scale: number = 1
Glyph scale factor, defaults to 1
Returns BoundingBox
BoundingBox whose width/height are the rendered size in pixels (origin Zero)
publicwrite
Writes debug text using the built in sprint font
Parameters
ctx: ExcaliburGraphicsContext
text: string
pos: Vector
optionalforeground: Color
Optional foreground color override
optionalbackground: Color
Optional background color override
scale: number = 1
Optional glyph scale factor, defaults to 1
Returns void
Internal debug text helper