Skip to content

Commit 5fbba72

Browse files
authored
Merge pull request #44 from lesamouraipourpre/ondiskbitmap-changes
Update the pixel_shader usage of OnDiskBitmap
2 parents ae05258 + 5b78812 commit 5fbba72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

adafruit_portalbase/graphics.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ def set_background(self, file_or_color, position=None):
8585
background = displayio.OnDiskBitmap(self._bg_file)
8686
self._bg_sprite = displayio.TileGrid(
8787
background,
88-
pixel_shader=displayio.ColorConverter(),
88+
pixel_shader=getattr(
89+
background, "pixel_shader", displayio.ColorConverter()
90+
),
91+
# TODO: Once CP6 is no longer supported, replace the above line with below
92+
# pixel_shader=background.pixel_shader,
8993
x=position[0],
9094
y=position[1],
9195
)

0 commit comments

Comments
 (0)