From fa9698aaaa395feb69cb96ca7ad913ca2f3e083d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 28 Dec 2015 16:37:54 +0100 Subject: [PATCH] Revert back to always call #setClockwise() in #resolveCrossings() This solves some regressions, e.g. https://github.com/paperjs/paper.js/issues/869#issuecomment-167586249 --- src/path/PathItem.Boolean.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index 6c7bf4cf..73423dda 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -800,6 +800,7 @@ PathItem.inject(new function() { }); var items = [], excluded = {}, + clockwise = paths[0].isClockwise(), isNonZero = this.getFillRule() === 'nonzero', windings = isNonZero && Base.each(paths, function(path) { this.push(path.isClockwise() ? 1 : -1); @@ -832,12 +833,13 @@ PathItem.inject(new function() { isContained = true; if (!excluded[j]) { // Set opposite orientation of containing path. - path.setClockwise(!paths[j].isClockwise()); + clockwise = !paths[j].isClockwise(); break; } } } if (!exclude) { + path.setClockwise(clockwise); items.push(path); } }