Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boundingBox returns (0,0,0,0) for Trees generated with mkText #94

Closed
expipiplus1 opened this issue Jun 13, 2020 · 5 comments
Closed

boundingBox returns (0,0,0,0) for Trees generated with mkText #94

expipiplus1 opened this issue Jun 13, 2020 · 5 comments

Comments

@expipiplus1
Copy link
Contributor

No description provided.

@lemmih
Copy link
Member

lemmih commented Jun 13, 2020

Yeah, the bounding box of text depends on the font. There's not much to do here except make a note of it in the documentation.

@expipiplus1
Copy link
Contributor Author

expipiplus1 commented Jun 14, 2020 via email

@lemmih
Copy link
Member

lemmih commented Jun 14, 2020

Computing correct bounding boxes for all of SVG, including masks and filter effects, would be a mighty burden. If you need accurate bounding boxes, you can always raster the SVG fragment and look at the pixels. There are nice helper functions for this.

@lemmih
Copy link
Member

lemmih commented Jul 10, 2020

I've updated the docs to say that bounding boxes are best-effort.

@lemmih lemmih closed this as completed Jul 10, 2020
@expipiplus1
Copy link
Contributor Author

expipiplus1 commented Jul 10, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants