"""
self._width = 1
self._height = 1
- self._color_index = color_index
+ self._color_index = color_index + 1
super().__init__(pixel_shader, x, y)
self.width = width
@property
def color_index(self) -> int:
"""The color_index of the rectangle as 0 based index of the palette."""
- return self._color_index
+ return self._color_index - 1
@color_index.setter
def color_index(self, value: int) -> None:
- self._color_index = abs(value)
+ self._color_index = abs(value + 1)
self._shape_set_dirty()
def _get_pixel(self, x: int, y: int) -> int: