Commit 7eff50ac authored by ubbn's avatar ubbn
Browse files

Allowed negative coordinates. Fix to #174

parent 9abf0a1a
...@@ -244,12 +244,13 @@ namespace Svg ...@@ -244,12 +244,13 @@ namespace Svg
else else
{ {
bounds = this.Bounds; //do just one call to the recursive bounds property bounds = this.Bounds; //do just one call to the recursive bounds property
this.ViewBox = new SvgViewBox(bounds.X, bounds.Y, bounds.Width, bounds.Height);
} }
} }
if (isWidthperc) if (isWidthperc)
{ {
w = (bounds.Width + bounds.X) * (Width.Value * 0.01f); w = (bounds.Width) * (Width.Value * 0.01f);
} }
else else
{ {
...@@ -257,7 +258,7 @@ namespace Svg ...@@ -257,7 +258,7 @@ namespace Svg
} }
if (isHeightperc) if (isHeightperc)
{ {
h = (bounds.Height + bounds.Y) * (Height.Value * 0.01f); h = (bounds.Height) * (Height.Value * 0.01f);
} }
else else
{ {
......
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