diff --git a/Source/Document Structure/SvgFragment.cs b/Source/Document Structure/SvgFragment.cs index ef8c813196b7281f7a70b943f618c300f55b5ef6..6ca9b0a86ccf8b6c25f5fd0a184ab63415ebf491 100644 --- a/Source/Document Structure/SvgFragment.cs +++ b/Source/Document Structure/SvgFragment.cs @@ -244,12 +244,13 @@ namespace Svg else { 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) { - w = (bounds.Width + bounds.X) * (Width.Value * 0.01f); + w = (bounds.Width) * (Width.Value * 0.01f); } else { @@ -257,7 +258,7 @@ namespace Svg } if (isHeightperc) { - h = (bounds.Height + bounds.Y) * (Height.Value * 0.01f); + h = (bounds.Height) * (Height.Value * 0.01f); } else {