Skip to content

anchor_point and anchored_position do not work well with scale #55

Closed
@kevinjwalters

Description

@kevinjwalters

I updated my libraries (from adafruit-circuitpython-bundle-5.x-mpy-20200625) and tried this,

Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit CLUE nRF52840 Express with nRF52840
>>> import terminalio, displayio, board
>>> from adafruit_display_text import label
>>> text_area = label.Label(terminalio.FONT, text="Scale!", scale=5, color=0xc0c0c0)
>>> board.DISPLAY.show(text_area)
>>> text_area.anchor_point
(0, 0)
>>> text_area.anchored_position
(0, -7)
>>> text_area.anchored_position = (0, 0)  ### expectation is text will be on screen at top left

The position of that text is not entirely on screen, the top is chopped off. This is presumably due to issues with a scale which isn't the default value of 1. Discussed this a little bit recently with @FoamyGuy in Discord.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions