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

Default ViewBox can be misleading #160

Open
moazin opened this issue Jul 31, 2021 · 0 comments
Open

Default ViewBox can be misleading #160

moazin opened this issue Jul 31, 2021 · 0 comments

Comments

@moazin
Copy link
Collaborator

moazin commented Jul 31, 2021

Right now, a default of ViewBox of 0 0 320.0 200.0 is assumed if none is provided. If Width and Height are called they would return these numbers which is wrong in my opinion. By default, no size should be assume and we should have APIs that can tell the client if an actual width, height or viewbox attribute was provided or not and if yes, it should allow them to grab those values.

Also, I think the API for rendering should be different. There should be a render function that simply renders the document to a provided canvas without doing any scaling or taking the viewBox into account at all. Then there should be another one that render the ViewBox but scale it up or down as you ask (by providing Width and Height, say).

If you agree, let's discuss the API design. @dirkschulze

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

1 participant