Skip to content

TextAlign changes the offset of text #1268

@junkmail22

Description

@junkmail22

When you choose a centrally-aligned TextLayout, the text is offset such that the position of the DrawParam is now the center of the text rather than the top-left corner. This is inconsistent with all other drawables, where unless specified otherwise by the DrawParam, the given position is the top-left corner of the drawable, as well as with previous versions of ggez.

As it currently stands, centrally-aligned text must be handled as a special case in all drawing logic, which is undesirable. Furthermore, if you want to set your text to be drawn with the given position as the center of the text, this is already possible with DrawParam::offset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions