mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Apply matrices before calculating boolean path operations.
This commit is contained in:
parent
3cd141170a
commit
516b9d040f
2 changed files with 4 additions and 2 deletions
|
@ -2726,6 +2726,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
|||
}
|
||||
if (!_dontNotify)
|
||||
this._changed(/*#=*/ Change.GEOMETRY);
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -107,8 +107,9 @@ PathItem.inject(new function() {
|
|||
// We do not modify the operands themselves
|
||||
// The result might not belong to the same type
|
||||
// i.e. subtraction(A:Path, B:Path):CompoundPath etc.
|
||||
path1 = reorientPath(path1.clone(false));
|
||||
path2 = reorientPath(path2.clone(false));
|
||||
// Also apply matrices to both paths in case they were transformed.
|
||||
path1 = reorientPath(path1.clone(false).applyMatrix());
|
||||
path2 = reorientPath(path2.clone(false).applyMatrix());
|
||||
var path1Clockwise = path1.isClockwise(),
|
||||
path2Clockwise = path2.isClockwise(),
|
||||
// Calculate all the intersections
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue