mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Revert back to always call #setClockwise() in #resolveCrossings()
This solves some regressions, e.g. https://github.com/paperjs/paper.js/issues/869#issuecomment-167586249
This commit is contained in:
parent
4d13f0e1e0
commit
fa9698aaaa
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue