Skip to content

Render with relative anchor #28

@SwiftsNamesake

Description

@SwiftsNamesake

I wonder if it'd be possible to add some kind of withAnchor function. For example, if you want to render centred text at a point p, you would do withAnchor (V2 0.5 0.5) p $ ... or something similar. In other words, the coordinates are relative to the bounding box of the thing being rendered and are normalised with respect to it.

It would also be useful if you wanted to position elements relative to each other (eg. so that they're adjacent to each other).

I'm already aware of PlaneBoundable but there's no instance for text it seems. Also, withTransformation simply transforms the coordinates with the given matrix, right?

Maybe this functionality is already available (or easy to emulate), but if so I haven't found it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions