Commit 6398bf72 authored by HeinrichAD's avatar HeinrichAD
Browse files

Update to fix Draw(Height,Width) overload

Update to fix Draw(Height,Width) overload
#211 by OperatorOverload
Pull Request from master
parent f519f708
......@@ -486,9 +486,10 @@ namespace Svg
//EO, 2014-12-05: Requested to ensure proper zooming (draw the svg in the bitmap size, ==> proper scaling)
//EO, 2015-01-09, Added GetDimensions to use its returned size instead of this.Width and this.Height (request of Icarrere).
//BBN, 2015-07-29, it is unnecassary to call again GetDimensions and transform to 1x1
//SizeF size = this.GetDimensions();
//renderer.ScaleTransform(bitmap.Width / size.Width, bitmap.Height / size.Height);
//BBN, 2015-07-29, it is unnecassary to call again GetDimensions and transform to 1x1
//JA, 2015-12-18, this is actually necessary to correctly render the Draw(rasterHeight, rasterWidth) overload, otherwise the rendered graphic doesn't scale correctly
SizeF size = this.GetDimensions();
renderer.ScaleTransform(bitmap.Width / size.Width, bitmap.Height / size.Height);
//EO, 2014-12-05: Requested to ensure proper zooming out (reduce size). Otherwise it clip the image.
this.Overflow = SvgOverflow.Auto;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment