Last active
November 26, 2024 06:23
-
-
Save anecdata/e30c763142d7e5775bd7706f6307a8ad to your computer and use it in GitHub Desktop.
bitmaptools.rotozoom-ed bitmap_label
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import board | |
import terminalio | |
import displayio | |
import bitmaptools | |
import math | |
from adafruit_display_text import bitmap_label | |
text_area = bitmap_label.Label(terminalio.FONT, x=25, y=25, text="Hello world") | |
roto_text_area = displayio.Bitmap(100, 100, 2) | |
bitmaptools.rotozoom(roto_text_area, text_area.bitmap, angle=math.pi/4) | |
palette = displayio.Palette(2) | |
palette[1] = 0xFF00FF | |
tile_grid = displayio.TileGrid(roto_text_area, pixel_shader=palette) | |
splash = displayio.Group() | |
splash.append(tile_grid) | |
board.DISPLAY.root_group = splash | |
while True: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compare to

adafruit_display_text
.label_direction
(90° rotations only):