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

Calculate bounding box by traversing Paint tree if there is no expicit box or base glyph #52

Open
justvanrossum opened this issue Nov 2, 2021 · 3 comments

Comments

@justvanrossum
Copy link
Collaborator

Need to check the spec for details. blackrenderer currently relies on having a ClipBox or a base glyph bounding box.

@justvanrossum
Copy link
Collaborator Author

"no base glyph" should probably be read as "empty base glyph".

@anthrotype
Copy link
Contributor

anthrotype commented Sep 22, 2022

the bounding box for an "empty base glyph" would be (0,0,0,0) but I think you actually want it unbounded, i.e. (float("-inf"), float("-inf"), float("+inf"), float("+inf"))

@justvanrossum
Copy link
Collaborator Author

That would be a problem for the high level render code that uses bounding boxes to calculate a decent default canvas size.

I think it should fall back to traversing the Paint graph to obtain the actual box in that case, as per the title of this issue.

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