adafruit / Adafruit_Blinka_Displayio

Displayio for Blinka
MIT License
14 stars 20 forks source link

adding blit implementation to Bitmap #98

Closed FoamyGuy closed 2 years ago

FoamyGuy commented 2 years ago

This change adds an implementation for Bitmap.blit(). The specific code was taken and adapted from here: https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/blob/41f06c33ef7a029210416ac61319698f5768e83e/adafruit_display_text/bitmap_label.py#L479-L522

This change is required in order for Blinka_DisplayIO to be able to display BitmapLabel objects. With the empty pass implementation this if statement equates to True https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/blob/41f06c33ef7a029210416ac61319698f5768e83e/adafruit_display_text/bitmap_label.py#L466 and tries to call bitmap.blit() which doesn't do anything, causing the glyphs not to get copied into the bitmap that is going to be shown on the display.

I tested this change successfully using Blinka_DisplayIO_PyGameDisplay and Raspberry Pi 3 B+

FoamyGuy commented 2 years ago

Also had to change language in docs/conf.py to be "en" instead of None because it was raising a warning that was treated as error when doing the docs build in CI.

Warning, treated as error:
Invalid configuration value found: 'language = None'. Update your configuration to a valid langauge code. Falling back to 'en' (English).