]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blobdiff - displayio/_display.py
prevent reuse of a stopped thread
[hackapet/Adafruit_Blinka_Displayio.git] / displayio / _display.py
index 88900871b6f28f73f80a337c66b9b5d6edf834dc..241a0aa7ccb9fcc73ed4c5631aed8fbdefb40e05 100644 (file)
@@ -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 = []
@@ -289,7 +289,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)))
@@ -394,6 +394,7 @@ class Display:
         elif not value and self._refresh_thread.is_alive():
             # Stop the thread
             self._refresh_thread.join()
+            self._refresh_thread = None
 
     @property
     def brightness(self) -> float: