Thin render output - BUG in SvgDocument.cs Draw(int rasterWidth, int rasterHeight) #860
Unanswered
slovakfreelancer
asked this question in
Q&A
Replies: 1 comment
-
I think this is expected behavior. From the function documentation:
If you want to preserve the aspect ratio, you have to set one of width or height to 0. |
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.
-
Hi everybody.
I got incorrect output from my svg file when I tried to render it as SvgDocument.Draw(673, 1000)
attached here with svg and png:
pic.zip
I found that bug is in SVG 3.2.3 at file SvgDocument.cs in method:
public virtual Bitmap Draw(int rasterWidth, int rasterHeight)
at line
renderer.ScaleTransform(size.Width / dimensions.Width, size.Height / dimensions.Height);
It must be divided by one number and not with width and height separately.
This one number which is calculated as reduction ratio is as big that picture box will fits into report box.
I used your latest Nuget 3.2.3 in my .NET Core 3.1 app.
Can you somebody fix it and make new nuget version? I do not know how to pull request - I am new here.
Thanks.
Slovakfreelancer
Beta Was this translation helpful? Give feedback.
All reactions