"Samples/vscode:/vscode.git/clone" did not exist on "cd9499c47a1b3a74c1bf22ee7d434ee8c679bddc"
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.
parent 0e611506
......@@ -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