circuitpython/shared-bindings
Jeff Epler 9df8f235b1 OnDiskBitmap: INCOMPATIBLE CHANGE: Allow them to use palettes
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())
```
2021-05-28 10:53:21 -05:00
..
2021-05-19 12:21:48 -07:00
2021-04-25 19:57:21 +09:00
2021-03-26 15:38:20 -05:00
2021-05-06 16:22:35 +03:00
2021-03-15 19:27:36 +05:30
2021-05-06 09:04:56 -07:00
2021-03-15 19:27:36 +05:30
2021-05-06 09:04:56 -07:00
2021-03-15 19:27:36 +05:30
2021-03-15 19:27:36 +05:30
2021-03-15 19:27:36 +05:30
2021-03-15 19:27:36 +05:30
2021-03-15 19:27:36 +05:30
2021-03-15 19:27:36 +05:30
2021-03-15 19:27:36 +05:30
2021-03-15 19:27:36 +05:30
2021-03-15 19:27:36 +05:30
2021-03-15 19:27:36 +05:30
2021-03-15 19:27:36 +05:30
2021-05-10 21:13:05 +01:00
2021-03-15 19:27:36 +05:30
2021-03-15 19:27:36 +05:30
2021-05-07 10:03:02 -07:00