9df8f235b1
Before, when an OnDiskBitmap was a paletted bitmap type, the palette was internal to the OnDiskBitmap, and it internally performed the palette conversion itself. When using with a tilegrid, a ColorConverter() object always had to be passed. Now, an OnDiskBitmap has a "pixel_shader" property. If the bitmap is a paletted bitmap type, it is a (modifiable) Palette object. Otherwise, it is a ColorConverter() object as before. This allows palette effects to be applied to paletted OnDiskBitmaps. Code that used to say: ```python face = displayio.TileGrid(odb, pixel_shader=displayio.ColorConverter()) ``` must be updated to say: ```python face = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader) ``` Compatible code for 6.x and 7.x can say ```python face = displayio.TileGrid(odb, pixel_shader=getattr(odb, 'pixel_shader', ColorConverter()) ``` |
||
---|---|---|
.. | ||
__init__.c | ||
__init__.h | ||
area.h | ||
Bitmap.c | ||
Bitmap.h | ||
ColorConverter.c | ||
ColorConverter.h | ||
display_core.c | ||
display_core.h | ||
Display.c | ||
Display.h | ||
EPaperDisplay.c | ||
EPaperDisplay.h | ||
FourWire.c | ||
FourWire.h | ||
Group.c | ||
Group.h | ||
I2CDisplay.c | ||
I2CDisplay.h | ||
mipi_constants.h | ||
OnDiskBitmap.c | ||
OnDiskBitmap.h | ||
Palette.c | ||
Palette.h | ||
Shape.c | ||
Shape.h | ||
TileGrid.c | ||
TileGrid.h |