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

cannot get bounding box of a path #561

Open
Hurricane996 opened this issue Mar 21, 2024 · 2 comments
Open

cannot get bounding box of a path #561

Hurricane996 opened this issue Mar 21, 2024 · 2 comments

Comments

@Hurricane996
Copy link

there's no way to get the bounding box of a path without cloning the path and calling into_outline on the clone. this is slow.

@Hurricane996
Copy link
Author

the solution would be to add a get_bounds method to path which calls flush_current_contour and returns outline.bounds

@s3bk
Copy link
Collaborator

s3bk commented Mar 21, 2024

I assume you are talking about the Path in pathfinder_canvas ?
It doesn't even need to call flush. Just call bounds() on the outlines and current_contour and compute their union.

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