-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Consistency in Scaling #3
Labels
enhancement
New feature or request
Comments
Added but not tested : 7c0ddbf. |
The problem is that ...
SVGView view(document.getBbox());
document.render(bitmap, view, dpi, bgColor);
...
|
Added : aed8047 |
Added renderToBitmap : fc6eaff SVGDocument document;
document.loadFromFile("filename.svg");
Bitmap bitmap = document.renderToBitmap();
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, @sammycage.
When I changed
documentWidth
anddocumentHeight
in the svg2png example as follows, the image content was cropped in some cases.scaled:
cropped:
Is there a consistent way to scale the content to fit the
lunasvg::Bitmap
size without cropping?svgren has a option to request a size, and it works as I expect.
https://github.com/igagis/svgren/blob/ca45437ab6b89430c8336404889b00bc5f0147ef/src/svgren/render.hpp#L12-L27
Here are the test files.
The text was updated successfully, but these errors were encountered: