Commit f062078c authored by Tebjan Halm's avatar Tebjan Halm
Browse files

Merge pull request #112 from EricOuellet2/master

SvgDocument.Draw support different bitmap size as svg default size
parents 4cd65121 9336c763
No related merge requests found
Showing with 12 additions and 5 deletions
+12 -5
......@@ -465,11 +465,18 @@ namespace Svg
try
{
using (var renderer = SvgRenderer.FromImage(bitmap))
{
renderer.SetBoundable(new GenericBoundable(0, 0, bitmap.Width, bitmap.Height));
this.Render(renderer);
}
using (var renderer = SvgRenderer.FromImage(bitmap))
{
renderer.SetBoundable(new GenericBoundable(0, 0, bitmap.Width, bitmap.Height));
//EO, 2014-12-05: Requested to ensure proper zooming (draw the svg in the bitmap size, ==> proper scaling)
renderer.ScaleTransform(bitmap.Width / this.Width, bitmap.Height / this.Height);
//EO, 2014-12-05: Requested to ensure proper zooming out, reduce size. Otherwise it clip the image.
this.Overflow = SvgOverflow.auto;
this.Render(renderer);
}
}
catch
{
......
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