:mod:`_stage` ============= .. py:module:: _stage .. autoapi-nested-parse:: C-level helpers for animation of sprites on a stage The `_stage` module contains native code to speed-up the ```stage`` Library `_. .. function:: render(x0: int, y0: int, x1: int, y1: int, layers: list, buffer: bytearray, display: displayio.Display, scale: int, background: int) -> Any Render and send to the display a fragment of the screen. :param int x0: Left edge of the fragment. :param int y0: Top edge of the fragment. :param int x1: Right edge of the fragment. :param int y1: Bottom edge of the fragment. :param list layers: A list of the :py:class:`~_stage.Layer` objects. :param bytearray buffer: A buffer to use for rendering. :param ~displayio.Display display: The display to use. :param int scale: How many times should the image be scaled up. :param int background: What color to display when nothing is there. There are also no sanity checks, outside of the basic overflow checking. The caller is responsible for making the passed parameters valid. This function is intended for internal use in the ``stage`` library and all the necessary checks are performed there. .. py:class:: Layer(width: int, height: int, graphic: bytearray, palette: bytearray, grid: bytearray) Keep information about a single layer of graphics .. method:: move(self, x: Any, y: Any) Set the offset of the layer to the specified values. .. method:: frame(self, frame: Any, rotation: Any) Set the animation frame of the sprite, and optionally rotation its graphic. .. py:class:: Text(width: int, height: int, font: bytearray, palette: bytearray, chars: bytearray) Keep information about a single grid of text .. method:: move(self, x: Any, y: Any) Set the offset of the text to the specified values.