We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This sample code illustrates the issue:
import board import time import terminalio from adafruit_display_text import label from adafruit_bitmap_font import bitmap_font text = "Helloworld" font = bitmap_font.load_font("fonts/Helvetica-Bold-16.bdf") text_area = label.Label(font, text=text*5) text_area.anchor_point = (0.75,0) text_area.anchored_position = (190, 10) board.DISPLAY.show(text_area) i = 0 while True: time.sleep(0.01) if i % 2 == 0: text_area.text = "Hello world1".format(i) else: text_area.text = "Hello\nworld {}".format(i) i += 1
The label will move itself left until it reaches the edge of the screen.
This appears to be a rounding issue with floating point math in the anchored_position getter and setter which get called when the text is updated.
The text was updated successfully, but these errors were encountered:
Remove unnecessary anchoring code
3ea6b12
adafruit/Adafruit_CircuitPython_Display_Text#82 Has been fixed and closed, this code is no longer necessary.
jepler
FoamyGuy
Successfully merging a pull request may close this issue.
This sample code illustrates the issue:
The label will move itself left until it reaches the edge of the screen.
This appears to be a rounding issue with floating point math in the anchored_position getter and setter which get called when the text is updated.
The text was updated successfully, but these errors were encountered: