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:
Jürg Lehni 2015-12-28 16:37:54 +01:00
parent 4d13f0e1e0
commit fa9698aaaa

View file

@ -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);
}
}