Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
47382ffe
Commit
47382ffe
authored
11 years ago
by
Furry Futtock
Browse files
Options
Download
Email Patches
Plain Diff
Fixed stack overflow due to recursion.
parent
2bba3e4e
master
netstandard2
nuget2.4.2
nuget2.4.1
nuget2.4
nuget2.3
nuget2.2.2
nuget2.2.1
nuget1.7
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/Basic Shapes/SvgPolyline.cs
+7
-6
Source/Basic Shapes/SvgPolyline.cs
with
7 additions
and
6 deletions
+7
-6
Source/Basic Shapes/SvgPolyline.cs
+
7
-
6
View file @
47382ffe
...
@@ -13,13 +13,14 @@ namespace Svg
...
@@ -13,13 +13,14 @@ namespace Svg
[
SvgElement
(
"polyline"
)]
[
SvgElement
(
"polyline"
)]
public
class
SvgPolyline
:
SvgPolygon
public
class
SvgPolyline
:
SvgPolygon
{
{
private
GraphicsPath
_Path
;
public
override
GraphicsPath
Path
public
override
GraphicsPath
Path
{
{
get
get
{
{
if
(
Path
==
null
||
this
.
IsPathDirty
)
if
(
_
Path
==
null
||
this
.
IsPathDirty
)
{
{
Path
=
new
GraphicsPath
();
_
Path
=
new
GraphicsPath
();
try
try
{
{
...
@@ -28,13 +29,13 @@ namespace Svg
...
@@ -28,13 +29,13 @@ namespace Svg
PointF
endPoint
=
new
PointF
(
Points
[
i
].
ToDeviceValue
(
this
),
Points
[
i
+
1
].
ToDeviceValue
(
this
));
PointF
endPoint
=
new
PointF
(
Points
[
i
].
ToDeviceValue
(
this
),
Points
[
i
+
1
].
ToDeviceValue
(
this
));
// TODO: Remove unrequired first line
// TODO: Remove unrequired first line
if
(
Path
.
PointCount
==
0
)
if
(
_
Path
.
PointCount
==
0
)
{
{
Path
.
AddLine
(
endPoint
,
endPoint
);
_
Path
.
AddLine
(
endPoint
,
endPoint
);
}
}
else
else
{
{
Path
.
AddLine
(
Path
.
GetLastPoint
(),
endPoint
);
_
Path
.
AddLine
(
_
Path
.
GetLastPoint
(),
endPoint
);
}
}
}
}
}
}
...
@@ -44,7 +45,7 @@ namespace Svg
...
@@ -44,7 +45,7 @@ namespace Svg
}
}
this
.
IsPathDirty
=
false
;
this
.
IsPathDirty
=
false
;
}
}
return
Path
;
return
_
Path
;
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help