X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/blobdiff_plain/9f5e3d4ba21720f05568f0eebeaddd77565e441b..ec2857d4ecd1d5258fb00c6d8931d0267c190eee:/displayio/_display.py diff --git a/displayio/_display.py b/displayio/_display.py index 8890087..1e42995 100644 --- a/displayio/_display.py +++ b/displayio/_display.py @@ -41,7 +41,7 @@ from ._constants import ( BACKLIGHT_PWM, ) -__version__ = "0.0.0-auto.0" +__version__ = "0.0.0+auto.0" __repo__ = "https://github.com/adafruit/Adafruit_Blinka_displayio.git" displays = [] @@ -272,6 +272,11 @@ class Display: ) # pylint: disable=protected-access # save image to buffer (or probably refresh buffer so we can compare) self._buffer.paste(buffer) + else: + # show nothing + print("show nothing") + buffer = Image.new("RGBA", (self._core._width, self._core._height)) + self._buffer.paste(buffer) self._subrectangles = self._core.get_refresh_areas() @@ -289,7 +294,7 @@ class Display: def _refresh_display_area(self, rectangle): """Loop through dirty rectangles and redraw that area.""" img = self._buffer.convert("RGB").crop(astuple(rectangle)) - img = img.rotate(self._rotation, expand=True) + img = img.rotate(360 - self._rotation, expand=True) display_rectangle = self._apply_rotation(rectangle) img = img.crop(astuple(self._clip(display_rectangle))) @@ -452,3 +457,11 @@ class Display: def bus(self) -> _DisplayBus: """Current Display Bus""" return self._core.get_bus() + + @property + def root_group(self) -> Group: + return self._current_group + + @root_group.setter + def root_group(self, new_group): + self._current_group = new_group \ No newline at end of file