Commit 7afd39a1 authored by sovietmagic's avatar sovietmagic
Browse files

Added StrokeWidth check to SvgVisualElement.RenderStroke.

RenderStroke method won't render the stroke if StrokeWidth is less or equal zero.
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -215,7 +215,7 @@ namespace Svg
/// <param name="renderer">The <see cref="ISvgRenderer"/> object to render to.</param>
protected internal virtual bool RenderStroke(ISvgRenderer renderer)
{
if (this.Stroke != null && this.Stroke != SvgColourServer.None)
if (this.Stroke != null && this.Stroke != SvgColourServer.None && this.StrokeWidth > 0)
{
float strokeWidth = this.StrokeWidth.ToDeviceValue(renderer, UnitRenderingType.Other, this);
using (var brush = this.Stroke.GetBrush(this, renderer, Math.Min(Math.Max(this.StrokeOpacity * this.Opacity, 0), 1), true))
......
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