You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if there is (or could be) a way to compute the "bounding box" of an image.
I.e., the least box (if any), such that the image is void outside of the box.
Possibly you would argue that this defeats the concept of "infinite" image, but I would find it useful for two things:
being able to align/center text (by calling cut_glyphs, and then using the box of the resulting image to place it correctly)
being able to export optimally cropped pdfs (without having to keep track of the bounding box by myself, which is delicate when Bezier curves are involved, etc...)
Best,
Damien
The text was updated successfully, but these errors were encountered:
Vg is a low level API so it doesn't provide these things (see here about measuring text). In general you'd want to add more structure to keep track of these things.
For your second point, you could perhaps simply try to compute one based on the representation provided for renderers see here. If you get to something we could consider integrating it.
Hi,
First of all, thanks for this nice library!
I'm wondering if there is (or could be) a way to compute the "bounding box" of an image.
I.e., the least box (if any), such that the image is void outside of the box.
Possibly you would argue that this defeats the concept of "infinite" image, but I would find it useful for two things:
Best,
Damien
The text was updated successfully, but these errors were encountered: