forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
I haven't distilled this down into a test program, but I had a tilegrid with 8x5-pixel tiles, sized 4x23, and transposed. (so it ends up being a wide and short tilegrid)
I found that after the initial draw, only a narrow strip at the left of the tilegrid would be updated when I changed the tiles.
Here are the relevant snippets. Running with recent main branch on a feather rp2040.
font = displayio.Bitmap(8, 5*256, 2)
with open("/font5x8.bin", "rb") as f:
f.read(2)
bitmaptools.readinto(font, f, bits_per_pixel=1)
palette = displayio.Palette(2)
palette[1] = 0xff0000
label = displayio.TileGrid(font, pixel_shader=palette, height=23, width=4, tile_width=8, tile_height=5)
label.transpose_xy = True
label.x = 5
group = displayio.Group()
group.append(label)
DISPLAY.show(group)
...
# populate rows with strings to show
DISPLAY.auto_refresh=False
for i, r in enumerate(rows):
for j, c in enumerate(r):
#print((i,j, c))
label[i,j] = ord(c)
for j in range(j+1, 23):
label[j,i] = 32
DISPLAY.auto_refresh=True