Commit ba8a9744 authored by Tebjan Halm's avatar Tebjan Halm
Browse files

Merge pull request #88 from csmoore/master

Fix for GDI crash if stroke-dasharray contains value<=0
parents 3f90e468 45a2f4e8
......@@ -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
}
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