Text – Keep information about a single text of text

class _stage.Text(width, height, font, palette, chars)

Keep internal information about a text of text in a format suitable for fast rendering with the render() function.

Parameters:
  • width (int) – The width of the grid in tiles, or 1 for sprites.
  • height (int) – The height of the grid in tiles, or 1 for sprites.
  • font (bytearray) – The font data of the characters.
  • palette (bytearray) – The color palette to be used.
  • chars (bytearray) – The contents of the character grid.

This class is intended for internal use in the stage library and it shouldn’t be used on its own.

move(x, y)

Set the offset of the text to the specified values.