Skip to content

Commit

Permalink
Merge pull request #44 from lesamouraipourpre/ondiskbitmap-changes
Browse files Browse the repository at this point in the history
Update the pixel_shader usage of OnDiskBitmap
  • Loading branch information
makermelissa authored Jul 20, 2021
2 parents ae05258 + 5b78812 commit 5fbba72
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion adafruit_portalbase/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ def set_background(self, file_or_color, position=None):
background = displayio.OnDiskBitmap(self._bg_file)
self._bg_sprite = displayio.TileGrid(
background,
pixel_shader=displayio.ColorConverter(),
pixel_shader=getattr(
background, "pixel_shader", displayio.ColorConverter()
),
# TODO: Once CP6 is no longer supported, replace the above line with below
# pixel_shader=background.pixel_shader,
x=position[0],
y=position[1],
)
Expand Down

0 comments on commit 5fbba72

Please sign in to comment.