mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -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 = [],
|
var items = [],
|
||||||
excluded = {},
|
excluded = {},
|
||||||
|
clockwise = paths[0].isClockwise(),
|
||||||
isNonZero = this.getFillRule() === 'nonzero',
|
isNonZero = this.getFillRule() === 'nonzero',
|
||||||
windings = isNonZero && Base.each(paths, function(path) {
|
windings = isNonZero && Base.each(paths, function(path) {
|
||||||
this.push(path.isClockwise() ? 1 : -1);
|
this.push(path.isClockwise() ? 1 : -1);
|
||||||
|
@ -832,12 +833,13 @@ PathItem.inject(new function() {
|
||||||
isContained = true;
|
isContained = true;
|
||||||
if (!excluded[j]) {
|
if (!excluded[j]) {
|
||||||
// Set opposite orientation of containing path.
|
// Set opposite orientation of containing path.
|
||||||
path.setClockwise(!paths[j].isClockwise());
|
clockwise = !paths[j].isClockwise();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!exclude) {
|
if (!exclude) {
|
||||||
|
path.setClockwise(clockwise);
|
||||||
items.push(path);
|
items.push(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue