X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/blobdiff_plain/a0f10b55a919620936e1f697ae7e674f29d296dc..fd2b8d529d684746eff57775cf2b8ec246b9a096:/displayio/_tilegrid.py diff --git a/displayio/_tilegrid.py b/displayio/_tilegrid.py index 6705601..5abfad4 100644 --- a/displayio/_tilegrid.py +++ b/displayio/_tilegrid.py @@ -392,7 +392,7 @@ class TileGrid: # even if we multiply it back out offset = ( col * pixels_per_byte - + (row // pixels_per_byte) * width + + (row // pixels_per_byte) * pixels_per_byte * width + (row % pixels_per_byte) ) shift = (offset % pixels_per_byte) * colorspace.depth @@ -400,6 +400,7 @@ class TileGrid: # Reverse the shift by subtracting it from the leftmost shift shift = (pixels_per_byte - 1) * colorspace.depth - shift buffer[offset // pixels_per_byte] |= output_pixel.pixel << shift + return full_coverage def _finish_refresh(self):