Skip to content

Commit 347a824

Browse files
authored
Merge pull request #191 from FoamyGuy/blit_refactor
bitmaptools.blit refactor support
2 parents c8bc543 + d6779ab commit 347a824

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

adafruit_display_text/bitmap_label.py

+13
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Display_Text.git"
2828

2929
import displayio
30+
import bitmaptools
3031
from adafruit_display_text import LabelBase
3132

3233
try:
@@ -482,6 +483,18 @@ def _blit(
482483
y2=y_2,
483484
skip_index=skip_index,
484485
)
486+
elif hasattr(bitmaptools, "blit"):
487+
bitmaptools.blit(
488+
bitmap,
489+
source_bitmap,
490+
x,
491+
y,
492+
x1=x_1,
493+
y1=y_1,
494+
x2=x_2,
495+
y2=y_2,
496+
skip_source_index=skip_index,
497+
)
485498

486499
else: # perform pixel by pixel copy of the bitmap
487500
# Perform input checks

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# Uncomment the below if you use native CircuitPython modules such as
2828
# digitalio, micropython and busio. List the modules you use. Without it, the
2929
# autodoc module docs will fail to generate with a warning.
30-
autodoc_mock_imports = ["displayio", "adafruit_bitmap_font", "fontio"]
30+
autodoc_mock_imports = ["displayio", "adafruit_bitmap_font", "fontio", "bitmaptools"]
3131

3232

3333
intersphinx_mapping = {

0 commit comments

Comments
 (0)