Help Needed: How can I scale a SVG to specific pixel dimensions and then re-save to a new SVG? #998
Unanswered
futuremotiondev
asked this question in
Q&A
Replies: 1 comment
-
If you want to scale output image, there is following method. var image = svgDoc.Draw(32, 32); But if you scale as SVG, you need to scale each element. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
This isn't a bug report, but a help-needed question. I can't find anywhere to discuss how to use this library properly other than the auto generated docs.
I have a script that saves out icons at a specified size. Here's a sample SVG:
As an example, I want to resize this SVG to 32x32px. Not by manipulating the viewBox, but actually performing the scale on the path(s)/geometry itself and then setting the top level svg node’s width / height / viewbox properties to 32px. I can’t really find any documentation on manipulating a SVG’s dimensions nor can I find documentation about a SVG to SVG pipeline. I've been able to get this to work with rsvg-convert but there is an implementation flaw that has sent me looking for another solution.
Can someone point me in the right direction?
Thanks much.
Example data
Here's my SVG:
Used Versions
Using version 3.4.3, .NET Core. Windows 10 Pro x64.
Beta Was this translation helpful? Give feedback.
All reactions