Closed bradanlane closed 6 months ago
This works on 8.2.8 and 00824ad12229af15541d1431cf31f216e8e3587d on a MagTag. It may have been a library bug. I'm using display text 3.0.6.
Full test code:
import displayio
import board
import terminalio
import time
from adafruit_display_text import label
display = board.DISPLAY
INK_WIDTH = display.width
INK_HEIGHT = display.height
INK_WHITE = 0xffffff
INK_BLACK = 0x000000
display_group = displayio.Group()
background_bitmap = displayio.Bitmap(INK_WIDTH, INK_HEIGHT, 1)
palette = displayio.Palette(1)
palette[0] = INK_WHITE
group_tile = displayio.TileGrid(background_bitmap, pixel_shader=palette)
display_group.append(group_tile)
display.root_group = display_group
time.sleep(display.time_to_refresh + 0.1)
display.refresh()
display_group.append(displayio.Group(scale=4, x=70, y=100))
text_area = label.Label(terminalio.FONT, text="LED", color=INK_BLACK)
text_area.x = 70
text_area.y = 100
text_area.scale = 4
display_group[1].y=100
display_group[1] = text_area
# without these two lines, the "LED" text will appear at the top of the display rather than at y=100
time.sleep(display.time_to_refresh + 0.1)
display.refresh()
CircuitPython version
Code/REPL
Behavior
With the code, the display refreshes and then the text “LED” renders meant the middle of the SSD1608 200x200 ePaper display.
without the extra
display.show(None)
anddisplay.show(display_group)
the text displays at the top of the screen near the middle. It is as if they
value is ignored.Description
I see this issue has been closed. I am testing an SSD1608 and see that the
text_area.y
is ignored. i.e. on first refresh the test is in the correct location. On the subsequent refresh the x position is correct the y position it at the top of the display.The workaround is to use the same trick suggested by @anecdata in #
Additional information
No response