]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blobdiff - displayio/_bitmap.py
_needs_refresh bool for TileGrid. Remove duplicate _finish_refresh in Bitmap
[hackapet/Adafruit_Blinka_Displayio.git] / displayio / _bitmap.py
index 07eb7af8f4ddaba8cc31bed289b7051a8da9b030..7f9200695fff0d5459987cb0cfcc68eb2d6bd4a4 100644 (file)
@@ -57,8 +57,8 @@ class Bitmap:
         the Bitmap.
         """
 
-        if not 1 <= value_count <= 65535:
-            raise ValueError("value_count must be in the range of 1-65535")
+        if not 1 <= value_count <= 65536:
+            raise ValueError("value_count must be in the range of 1-65536")
 
         bits = 1
         while (value_count - 1) >> bits:
@@ -199,10 +199,6 @@ class Bitmap:
             elif bytes_per_value == 4:
                 struct.pack_into("<I", row, x * 4, value)
 
-    def _finish_refresh(self):
-        self._dirty_area.x1 = 0
-        self._dirty_area.x2 = 0
-
     def fill(self, value: int) -> None:
         """Fills the bitmap with the supplied palette index value."""
         if self._read_only: