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
ba8a9744
Commit
ba8a9744
authored
Jul 25, 2014
by
Tebjan Halm
Browse files
Merge pull request #88 from csmoore/master
Fix for GDI crash if stroke-dasharray contains value<=0
parents
3f90e468
45a2f4e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/Basic Shapes/SvgVisualElement.cs
View file @
ba8a9744
...
...
@@ -163,7 +163,7 @@ namespace Svg
if
(
this
.
StrokeDashArray
!=
null
&&
this
.
StrokeDashArray
.
Count
>
0
)
{
/* divide by stroke width - GDI behaviour that I don't quite understand yet.*/
pen
.
DashPattern
=
this
.
StrokeDashArray
.
ConvertAll
(
u
=>
u
.
Value
/
((
strokeWidth
<=
0
)
?
1
:
strokeWidth
)).
ToArray
();
pen
.
DashPattern
=
this
.
StrokeDashArray
.
ConvertAll
(
u
=>
((
u
.
Value
<=
0
)
?
1
:
u
.
Value
)
/
((
strokeWidth
<=
0
)
?
1
:
strokeWidth
)).
ToArray
();
}
renderer
.
DrawPath
(
pen
,
this
.
Path
);
...
...
@@ -247,4 +247,4 @@ namespace Svg
}
}
}
\ No newline at end of file
}
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