From 7fc029d98bc1ab7a947bac75246517b0ef329eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 4 Feb 2017 21:55:44 +0100 Subject: [PATCH] More quality related tweaks in getWinding() --- src/path/PathItem.Boolean.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index 17a6f1e9..5112b361 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -535,11 +535,8 @@ PathItem.inject(new function() { // quality with every crossing of the ray very close to the // path. This means that if the point is on or near multiple // curves, the quality becomes less than 0.5. - if (a > pa - qualityEpsilon && a < pa + qualityEpsilon) { - // TODO: Set quality depending on distance - // quality *= Math.min(1, (100 * epsilon * Math.abs(a - pa) + 0.5)); + if (a > pa - qualityEpsilon && a < pa + qualityEpsilon) quality /= 2; - } } else { if (winding !== windingPrev) { // Curve is crossed at starting point and winding changes @@ -561,7 +558,8 @@ PathItem.inject(new function() { } onPath = true; } - // TODO: + // TODO: Determine how to handle quality when curve is crossed + // at starting point. Do we always need to set to 0? quality = 0; } vPrev = v;