Shape – Represents a shape by defining its bounds on each row

Represents any shape made by defining boundaries that may be mirrored.


This will likely be changed before 4.0.0. Consider it very experimental.

class displayio.Shape(width, height, *, mirror_x=False, mirror_y=False)

Create a Shape object with the given fixed size. Each pixel is one bit and is stored by the column boundaries of the shape on each row. Each row’s boundary defaults to the full row.

  • width (int) – The number of pixels wide
  • height (int) – The number of pixels high
  • mirror_x (bool) – When true the left boundary is mirrored to the right.
  • mirror_y (bool) – When true the top boundary is mirrored to the bottom.
set_boundary(y, start_x, end_x)

Loads pre-packed data into the given row.