Commit 1be9ccff authored by drbassett's avatar drbassett
Browse files

Fix calculation of rectangle path

The rectangle path width/height was computed using the full stroke width.
It should have been using the half stroke width instead.
parent 44173b47
......@@ -193,8 +193,8 @@ namespace Svg
// Starting location which take consideration of stroke width
SvgPoint strokedLocation = new SvgPoint(Location.X - halfStrokeWidth, Location.Y - halfStrokeWidth);
var width = this.Width.ToDeviceValue(renderer, UnitRenderingType.Horizontal, this) + base.StrokeWidth;
var height = this.Height.ToDeviceValue(renderer, UnitRenderingType.Vertical, this) + base.StrokeWidth;
var width = this.Width.ToDeviceValue(renderer, UnitRenderingType.Horizontal, this) + halfStrokeWidth;
var height = this.Height.ToDeviceValue(renderer, UnitRenderingType.Vertical, this) + halfStrokeWidth;
var rectangle = new RectangleF(strokedLocation.ToDeviceValue(renderer, this), new SizeF(width, height));
......
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