add bitmaps and fix BACKGROUND fallback

This commit is contained in:
caternuson 2019-11-01 09:13:43 -07:00
parent 57657655b9
commit 29cf81523b
4 changed files with 2 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

View file

@ -46,6 +46,7 @@ try:
palette=displayio.Palette)
# Or just use solid color
except (OSError, TypeError):
BACKGROUND = BACKGROUND if isinstance(BACKGROUND, int) else 0x000000
bg_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
bg_palette = displayio.Palette(1)
bg_palette[0] = BACKGROUND

View file

@ -39,6 +39,7 @@ try:
palette=displayio.Palette)
# Or just use solid color
except (OSError, TypeError):
BACKGROUND = BACKGROUND if isinstance(BACKGROUND, int) else 0x000000
bg_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
bg_palette = displayio.Palette(1)
bg_palette[0] = BACKGROUND