Closed GoogleCodeExporter closed 8 years ago
Hi swexru
I'm glad you are finding the library useful. Thanks.
The solution to your problem is the viewBox attribute. It tells the renderer
what the bounds of your picture content is, so it knows how to scale it.
Inkscape doesn't add viewBox, so you either have to add them to the file
yourself, or add a viewBox after it is loaded, but before you render to canvas.
See the FAQ for more info. https://code.google.com/p/androidsvg/wiki/FAQ
In your case, adding the following lines should work for all or most of your
files:
svg.setDocumentViewBox(0, 0, svg.getDocumentWidth(), svg.getDocumentHeight());
svg.setDocumentWidth("100%");
svg.setDocumentHeight("100%");
Original comment by paul.leb...@gmail.com
on 22 Oct 2013 at 2:08
Thank you! Sorry for my blindness...
Original comment by swe...@gmail.com
on 22 Oct 2013 at 7:58
No worries. You're welcome.
Original comment by paul.leb...@gmail.com
on 23 Oct 2013 at 12:29
Original issue reported on code.google.com by
swe...@gmail.com
on 21 Oct 2013 at 11:52Attachments: