From a135515ff412637f649b36b80b68d409fb6f8804 Mon Sep 17 00:00:00 2001 From: Olivia Date: Wed, 28 Dec 2016 14:02:51 +0200 Subject: [PATCH] Refactoring DrawPathProcessor to use a const epsilon. --- src/ImageSharp/Drawing/Processors/DrawPathProcessor.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ImageSharp/Drawing/Processors/DrawPathProcessor.cs b/src/ImageSharp/Drawing/Processors/DrawPathProcessor.cs index 54ebc28efd..8cbee79085 100644 --- a/src/ImageSharp/Drawing/Processors/DrawPathProcessor.cs +++ b/src/ImageSharp/Drawing/Processors/DrawPathProcessor.cs @@ -9,7 +9,7 @@ namespace ImageSharp.Drawing.Processors using System.Linq; using System.Numerics; using System.Threading.Tasks; - + using Common; using ImageSharp.Processors; using Paths; using Pens; @@ -27,7 +27,6 @@ namespace ImageSharp.Drawing.Processors { private const float AntialiasFactor = 1f; private const int PaddingFactor = 1; // needs to been the same or greater than AntialiasFactor - private const float Epsilon = 0.001f; private readonly IPen pen; private readonly IPath[] paths; @@ -138,7 +137,7 @@ namespace ImageSharp.Drawing.Processors var opacity = this.Opacity(color.DistanceFromElement); - if (opacity > Epsilon) + if (opacity > Constants.Epsilon) { int offsetColorX = x - minX;