Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
a1ff72df
Commit
a1ff72df
authored
Nov 10, 2015
by
Tebjan Halm
Browse files
Merge pull request #201 from drbassett/fix-rectangle-path
Fix calculation of rectangle path
parents
d4f1779b
1be9ccff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/Basic Shapes/SvgRectangle.cs
View file @
a1ff72df
...
...
@@ -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
)
+
half
StrokeWidth
;
var
height
=
this
.
Height
.
ToDeviceValue
(
renderer
,
UnitRenderingType
.
Vertical
,
this
)
+
half
StrokeWidth
;
var
rectangle
=
new
RectangleF
(
strokedLocation
.
ToDeviceValue
(
renderer
,
this
),
new
SizeF
(
width
,
height
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment