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
f7c5fb06
Unverified
Commit
f7c5fb06
authored
Feb 03, 2019
by
mrbean-bremen
Browse files
Handle special case where path consists of a single move command
- prevents crash, fixes #223
parent
c409d2eb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Source/Paths/SvgPath.cs
View file @
f7c5fb06
...
...
@@ -45,13 +45,27 @@ namespace Svg
{
if
(
this
.
_path
==
null
||
this
.
IsPathDirty
)
{
_path
=
new
GraphicsPath
();
this
.
_path
=
new
GraphicsPath
();
foreach
(
SvgPathSegment
segment
in
this
.
PathData
)
{
segment
.
AddToPath
(
_path
);
}
if
(
_path
.
PointCount
==
0
)
{
if
(
this
.
PathData
.
Count
>
0
)
{
// special case with one move command only, see #223
var
segment
=
this
.
PathData
.
Last
;
_path
.
AddLine
(
segment
.
End
,
segment
.
End
);
this
.
Fill
=
SvgPaintServer
.
None
;
}
else
{
_path
=
null
;
}
}
this
.
IsPathDirty
=
false
;
}
return
_path
;
...
...
Tests/Svg.UnitTests/PassingTests.csv
View file @
f7c5fb06
...
...
@@ -181,6 +181,8 @@ __issue-191-01
__issue-202-01
__issue-214-01
__issue-215-01
__issue-223-01
__issue-223-02
__issue-227-01
__issue-227-02
__issue-239-01
...
...
Tests/W3CTestSuite/png/__issue-223-01.png
View replaced file @
c409d2eb
View file @
f7c5fb06
7.74 KB
|
W:
|
H:
6.18 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Tests/W3CTestSuite/png/__issue-223-02.png
View replaced file @
c409d2eb
View file @
f7c5fb06
7.74 KB
|
W:
|
H:
6.22 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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