]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blobdiff - vectorio/_rectangle.py
make internal _color_index one-based again
[hackapet/Adafruit_Blinka_Displayio.git] / vectorio / _rectangle.py
index e4c595272ad921a577e3ee557c3d8d81e162066f..15880c659c6b6c083c31818d5c77e56367454e85 100644 (file)
@@ -38,6 +38,7 @@ class Rectangle(_VectorShape):
         height: int,
         x: int,
         y: int,
+        color_index: int = 0,
     ):
         """Represents a rectangle by defining its bounds
 
@@ -51,7 +52,7 @@ class Rectangle(_VectorShape):
         """
         self._width = 1
         self._height = 1
-        self._color_index = 1
+        self._color_index = color_index + 1
 
         super().__init__(pixel_shader, x, y)
         self.width = width