Merge branch 'refs/heads/master' into boolean-operations

This commit is contained in:
Jürg Lehni 2015-01-04 22:00:55 +01:00
commit 8928eaffd0
2 changed files with 6 additions and 9 deletions

View file

@ -26,18 +26,18 @@
var inner = new Path.Circle({
center: view.center,
radius: 100,
insert: false
parent: originals,
fillColor: 'white'
});
var outer = new Path.Circle({
center: view.center,
radius: 140,
insert: false
parent: originals,
fillColor: 'white'
});
var ring = outer.subtract(inner);
ring.parent = originals;
ring.fillColor = 'white';
var operations = ['unite', 'intersect', 'subtract', 'exclude', 'divide'];
var colors = ['red', 'green', 'blue', 'black'];

View file

@ -169,12 +169,9 @@ PathItem.inject(new function() {
chain[j].segment._winding = winding;
}
// Trace closed contours and insert them into the result.
var result = new CompoundPath();
var result = new CompoundPath(Item.NO_INSERT);
result.insertAbove(path1);
result.addChildren(tracePaths(segments, operator), true);
// Delete the proxies
_path1.remove();
if (_path2)
_path2.remove();
// See if the CompoundPath can be reduced to just a simple Path.
result = result.reduce();
// Copy over the left-hand item's style and we're done.