TextSprite.getFirstLine ()
Get the index of the first line of text that is being drawnTextSprite.getLine (lineIndex)
Get the width of a single line of textTextSprite.getLineWidth (lineIndex)
Get the width of a specific line of textTextSprite.getNumLines ()
Get the current number of linesTextSprite.scaleBounds (scaleX, scaleY)
Scale the bounding box of the text spriteTextSprite.serialize (stringify, propertiesToExclude)
Export this TextSprite to an object that can then be used to create a new TextSprite like this one (by passing the resulting object to the TextSprite constructor).TextSprite.setAlignment (alignment)
Set the text alignmentTextSprite.setColor (color)
Set the text color.TextSprite.setFirstLine (firstLine)
Set the index of first line of text to be drawn (i.e. the number of lines to skip)TextSprite.setFixedSize (toggle)
Use a fixed size for this sprite. This prevents expensive calculations that happen when the text (or font, shadows and other properties) change, and the bounding box of the sprite needs to be updated.TextSprite.setFont (font)
Set a font style for the text sprite.TextSprite.setLineSpacing (lineSpacing)
Set the space between lines of textTextSprite.setMaxLines (maxLines)
Set the maximum number of lines that the text is allowed to contain. Any text that doesn't fit in that number of lines will not be drawn.TextSprite.setMaxWidth (maxWidth)
The maximum width of a line of text. If, according to the current font style, the text to display is longer than the specified width, it will be displayed on multiple lines.TextSprite.setOutline (width, color)
Set the width and color of the text outlineTextSprite.setShadow (color, blur, offsetX, offsetY)
Set a shadow to draw around the text spriteTextSprite.setText (text)
Set the text for the sprite