Twinside/Rasterific

Render with relative anchor

Opened this issue · 1 comments

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.

It should be doable while working with some bounding box, but it should appear "late" in the pipeline (once
geometry is fully transformed). The thing is, by creating a withAnchor, I'm not sure it's possible to export it
to pdf