Skip to content

bitmaptools.blit refactor support #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions adafruit_display_text/bitmap_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Display_Text.git"

import displayio
import bitmaptools
from adafruit_display_text import LabelBase

try:
Expand Down Expand Up @@ -482,6 +483,18 @@ def _blit(
y2=y_2,
skip_index=skip_index,
)
elif hasattr(bitmaptools, "blit"):
bitmaptools.blit(
bitmap,
source_bitmap,
x,
y,
x1=x_1,
y1=y_1,
x2=x_2,
y2=y_2,
skip_source_index=skip_index,
)

else: # perform pixel by pixel copy of the bitmap
# Perform input checks
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# Uncomment the below if you use native CircuitPython modules such as
# digitalio, micropython and busio. List the modules you use. Without it, the
# autodoc module docs will fail to generate with a warning.
autodoc_mock_imports = ["displayio", "adafruit_bitmap_font", "fontio"]
autodoc_mock_imports = ["displayio", "adafruit_bitmap_font", "fontio", "bitmaptools"]


intersphinx_mapping = {
Expand Down