X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/blobdiff_plain/e7f558f790efd2492cb53f43c077dce21fb5428b..6cd5a377b719823e1812fb2d0a950ab9af246126:/displayio/tilegrid.py diff --git a/displayio/tilegrid.py b/displayio/tilegrid.py index 861384e..d5b3446 100644 --- a/displayio/tilegrid.py +++ b/displayio/tilegrid.py @@ -200,20 +200,20 @@ class TileGrid: def _apply_palette(self, image): if isinstance(self._pixel_shader, Palette): image.putpalette( - self._pixel_shader._get_palette() - ) # pylint: disable=protected-access + self._pixel_shader._get_palette() # pylint: disable=protected-access + ) if isinstance(self._pixel_shader, ColorConverter): # This will be needed for eInks, grayscale, and monochrome displays pass def _add_alpha(self, image): if isinstance(self._pixel_shader, Palette): - alpha = self._bitmap._image.copy().convert( + alpha = self._bitmap._image.copy().convert( # pylint: disable=protected-access "P" - ) # pylint: disable=protected-access + ) alpha.putpalette( - self._pixel_shader._get_alpha_palette() - ) # pylint: disable=protected-access + self._pixel_shader._get_alpha_palette() # pylint: disable=protected-access + ) image.putalpha(alpha.convert("L")) # pylint: disable=too-many-locals @@ -237,9 +237,9 @@ class TileGrid: tile_index = self._tiles[tile_y * self._width + tile_x] tile_index_x = tile_index % tile_count_x tile_index_y = tile_index // tile_count_x - tile_image = self._bitmap._image.copy().convert( + tile_image = self._bitmap._image.copy().convert( # pylint: disable=protected-access "P" - ) # pylint: disable=protected-access + ) self._apply_palette(tile_image) tile_image = tile_image.convert("RGBA") self._add_alpha(tile_image)