vectorio – Lightweight 2d shapes for displays

class vectorio.Circle(radius: int)

Circle is positioned on screen by its center point.

Parameters

radius – The radius of the circle in pixels

radius :int

The radius of the circle in pixels.

class vectorio.Polygon(points: List[Tuple[int, int]])

Represents a closed shape by ordered vertices

Parameters

points – Vertices for the polygon

points :List[Tuple[int, int]]

Set a new look and shape for this polygon

class vectorio.Rectangle(width: int, height: int)

Represents a rectangle by defining its bounds

Parameters
  • width – The number of pixels wide

  • height – The number of pixels high

class vectorio.VectorShape(shape: Union[Polygon, Rectangle, Circle], pixel_shader: Union[displayio.ColorConverter, displayio.Palette], x: int = 0, y: int = 0)

Binds a vector shape to a location and pixel color

Parameters
  • shape – The shape to draw.

  • pixel_shader – The pixel shader that produces colors from values

  • x – Initial x position of the center axis of the shape within the parent.

  • y – Initial y position of the center axis of the shape within the parent.

x :int

X position of the center point of the shape in the parent.

y :int

Y position of the center point of the shape in the parent.

pixel_shader :Union[displayio.ColorConverter, displayio.Palette]

The pixel shader of the shape.