mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Prebuilt module for commit cbe41c536e
This commit is contained in:
parent
619ec44e78
commit
4de21a03e8
5 changed files with 88 additions and 64 deletions
46
dist/docs/assets/js/paper.js
vendored
46
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Date: Fri Jul 22 14:21:35 2016 +0200
|
* Date: Fri Jul 22 15:46:42 2016 +0200
|
||||||
*
|
*
|
||||||
***
|
***
|
||||||
*
|
*
|
||||||
|
@ -7565,8 +7565,11 @@ var PathItem = Item.extend({
|
||||||
_contains: function(point) {
|
_contains: function(point) {
|
||||||
var winding = point.isInside(
|
var winding = point.isInside(
|
||||||
this.getBounds({ internal: true, handle: true }))
|
this.getBounds({ internal: true, handle: true }))
|
||||||
&& this._getWinding(point);
|
? this._getWinding(point)
|
||||||
return !!(this.getFillRule() === 'evenodd' ? winding & 1 : winding);
|
: {};
|
||||||
|
return !!(this.getFillRule() === 'evenodd'
|
||||||
|
? winding.windingL & 1 || winding.windingR & 1
|
||||||
|
: winding.winding);
|
||||||
},
|
},
|
||||||
|
|
||||||
getIntersections: function(path, include, _matrix, _returnFirst) {
|
getIntersections: function(path, include, _matrix, _returnFirst) {
|
||||||
|
@ -9730,7 +9733,7 @@ PathItem.inject(new function() {
|
||||||
if (!(inter && inter._overlap)) {
|
if (!(inter && inter._overlap)) {
|
||||||
var path = segment._path;
|
var path = segment._path;
|
||||||
path._overlapsOnly = false;
|
path._overlapsOnly = false;
|
||||||
if (operator[segment._winding])
|
if (operator[segment._winding.winding])
|
||||||
path._validOverlapsOnly = false;
|
path._validOverlapsOnly = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9858,7 +9861,8 @@ PathItem.inject(new function() {
|
||||||
pathWindingL = 0,
|
pathWindingL = 0,
|
||||||
pathWindingR = 0,
|
pathWindingR = 0,
|
||||||
onPathWinding = 0,
|
onPathWinding = 0,
|
||||||
isOnPath = false,
|
onPathCount = 0,
|
||||||
|
onPath = false,
|
||||||
vPrev,
|
vPrev,
|
||||||
vClose;
|
vClose;
|
||||||
|
|
||||||
|
@ -9874,7 +9878,7 @@ PathItem.inject(new function() {
|
||||||
a3 = v[ia + 6];
|
a3 = v[ia + 6];
|
||||||
if (o0 === o3) {
|
if (o0 === o3) {
|
||||||
if (a1 < paR && a3 > paL || a3 < paR && a1 > paL) {
|
if (a1 < paR && a3 > paL || a3 < paR && a1 > paL) {
|
||||||
isOnPath = true;
|
onPath = true;
|
||||||
}
|
}
|
||||||
return vPrev;
|
return vPrev;
|
||||||
}
|
}
|
||||||
|
@ -9895,7 +9899,7 @@ PathItem.inject(new function() {
|
||||||
} else if (a > paR) {
|
} else if (a > paR) {
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
} else {
|
} else {
|
||||||
isOnPath = true;
|
onPath = true;
|
||||||
pathWindingL += winding;
|
pathWindingL += winding;
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
}
|
}
|
||||||
|
@ -9907,7 +9911,7 @@ PathItem.inject(new function() {
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
}
|
}
|
||||||
} else if (a3Prev < paL && a > paL || a3Prev > paR && a < paR) {
|
} else if (a3Prev < paL && a > paL || a3Prev > paR && a < paR) {
|
||||||
isOnPath = true;
|
onPath = true;
|
||||||
if (a3Prev < paL) {
|
if (a3Prev < paL) {
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
} else if (a3Prev > paR) {
|
} else if (a3Prev > paR) {
|
||||||
|
@ -9974,7 +9978,7 @@ PathItem.inject(new function() {
|
||||||
handleCurve(vClose);
|
handleCurve(vClose);
|
||||||
vClose = null;
|
vClose = null;
|
||||||
}
|
}
|
||||||
if (!pathWindingL && !pathWindingR && isOnPath) {
|
if (!pathWindingL && !pathWindingR && onPath) {
|
||||||
var add = path.isClockwise() ^ dir ? 1 : -1;
|
var add = path.isClockwise() ^ dir ? 1 : -1;
|
||||||
windingL += add;
|
windingL += add;
|
||||||
windingR -= add;
|
windingR -= add;
|
||||||
|
@ -9984,7 +9988,9 @@ PathItem.inject(new function() {
|
||||||
windingR += pathWindingR;
|
windingR += pathWindingR;
|
||||||
pathWindingL = pathWindingR = 0;
|
pathWindingL = pathWindingR = 0;
|
||||||
}
|
}
|
||||||
isOnPath = false;
|
if (onPath)
|
||||||
|
onPathCount++;
|
||||||
|
onPath = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!windingL && !windingR) {
|
if (!windingL && !windingR) {
|
||||||
|
@ -9994,7 +10000,10 @@ PathItem.inject(new function() {
|
||||||
windingR = windingR && (2 - abs(windingR) % 2);
|
windingR = windingR && (2 - abs(windingR) % 2);
|
||||||
return {
|
return {
|
||||||
winding: max(windingL, windingR),
|
winding: max(windingL, windingR),
|
||||||
contour: !windingL ^ !windingR
|
windingL: windingL,
|
||||||
|
windingR: windingR,
|
||||||
|
onContour: !windingL ^ !windingR,
|
||||||
|
onPathCount: onPathCount
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10025,8 +10034,8 @@ PathItem.inject(new function() {
|
||||||
if (parent instanceof CompoundPath)
|
if (parent instanceof CompoundPath)
|
||||||
path = parent;
|
path = parent;
|
||||||
winding = !(operator.subtract && path2 && (
|
winding = !(operator.subtract && path2 && (
|
||||||
path === path1 && path2._getWinding(pt, dir) ||
|
path === path1 && path2._getWinding(pt, dir).winding ||
|
||||||
path === path2 && !path1._getWinding(pt, dir)))
|
path === path2 && !path1._getWinding(pt, dir).winding))
|
||||||
? getWinding(pt, curves, dir)
|
? getWinding(pt, curves, dir)
|
||||||
: { winding: 0 };
|
: { winding: 0 };
|
||||||
break;
|
break;
|
||||||
|
@ -10034,9 +10043,7 @@ PathItem.inject(new function() {
|
||||||
length -= curveLength;
|
length -= curveLength;
|
||||||
}
|
}
|
||||||
for (var j = chain.length - 1; j >= 0; j--) {
|
for (var j = chain.length - 1; j >= 0; j--) {
|
||||||
var seg = chain[j].segment;
|
chain[j].segment._winding = winding;
|
||||||
seg._winding = winding.winding;
|
|
||||||
seg._contour = winding.contour;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10046,9 +10053,10 @@ PathItem.inject(new function() {
|
||||||
otherStart;
|
otherStart;
|
||||||
|
|
||||||
function isValid(seg, excludeContour) {
|
function isValid(seg, excludeContour) {
|
||||||
|
var winding;
|
||||||
return !!(seg && !seg._visited && (!operator
|
return !!(seg && !seg._visited && (!operator
|
||||||
|| operator[seg._winding]
|
|| operator[(winding = seg._winding).winding]
|
||||||
|| !excludeContour && operator.unite && seg._contour));
|
|| !excludeContour && operator.unite && winding.onContour));
|
||||||
}
|
}
|
||||||
|
|
||||||
function isStart(seg) {
|
function isStart(seg) {
|
||||||
|
@ -10177,7 +10185,7 @@ PathItem.inject(new function() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_getWinding: function(point, dir) {
|
_getWinding: function(point, dir) {
|
||||||
return getWinding(point, this.getCurves(), dir).winding;
|
return getWinding(point, this.getCurves(), dir);
|
||||||
},
|
},
|
||||||
|
|
||||||
unite: function(path) {
|
unite: function(path) {
|
||||||
|
|
46
dist/paper-core.js
vendored
46
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Date: Fri Jul 22 14:21:35 2016 +0200
|
* Date: Fri Jul 22 15:46:42 2016 +0200
|
||||||
*
|
*
|
||||||
***
|
***
|
||||||
*
|
*
|
||||||
|
@ -7565,8 +7565,11 @@ var PathItem = Item.extend({
|
||||||
_contains: function(point) {
|
_contains: function(point) {
|
||||||
var winding = point.isInside(
|
var winding = point.isInside(
|
||||||
this.getBounds({ internal: true, handle: true }))
|
this.getBounds({ internal: true, handle: true }))
|
||||||
&& this._getWinding(point);
|
? this._getWinding(point)
|
||||||
return !!(this.getFillRule() === 'evenodd' ? winding & 1 : winding);
|
: {};
|
||||||
|
return !!(this.getFillRule() === 'evenodd'
|
||||||
|
? winding.windingL & 1 || winding.windingR & 1
|
||||||
|
: winding.winding);
|
||||||
},
|
},
|
||||||
|
|
||||||
getIntersections: function(path, include, _matrix, _returnFirst) {
|
getIntersections: function(path, include, _matrix, _returnFirst) {
|
||||||
|
@ -9730,7 +9733,7 @@ PathItem.inject(new function() {
|
||||||
if (!(inter && inter._overlap)) {
|
if (!(inter && inter._overlap)) {
|
||||||
var path = segment._path;
|
var path = segment._path;
|
||||||
path._overlapsOnly = false;
|
path._overlapsOnly = false;
|
||||||
if (operator[segment._winding])
|
if (operator[segment._winding.winding])
|
||||||
path._validOverlapsOnly = false;
|
path._validOverlapsOnly = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9858,7 +9861,8 @@ PathItem.inject(new function() {
|
||||||
pathWindingL = 0,
|
pathWindingL = 0,
|
||||||
pathWindingR = 0,
|
pathWindingR = 0,
|
||||||
onPathWinding = 0,
|
onPathWinding = 0,
|
||||||
isOnPath = false,
|
onPathCount = 0,
|
||||||
|
onPath = false,
|
||||||
vPrev,
|
vPrev,
|
||||||
vClose;
|
vClose;
|
||||||
|
|
||||||
|
@ -9874,7 +9878,7 @@ PathItem.inject(new function() {
|
||||||
a3 = v[ia + 6];
|
a3 = v[ia + 6];
|
||||||
if (o0 === o3) {
|
if (o0 === o3) {
|
||||||
if (a1 < paR && a3 > paL || a3 < paR && a1 > paL) {
|
if (a1 < paR && a3 > paL || a3 < paR && a1 > paL) {
|
||||||
isOnPath = true;
|
onPath = true;
|
||||||
}
|
}
|
||||||
return vPrev;
|
return vPrev;
|
||||||
}
|
}
|
||||||
|
@ -9895,7 +9899,7 @@ PathItem.inject(new function() {
|
||||||
} else if (a > paR) {
|
} else if (a > paR) {
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
} else {
|
} else {
|
||||||
isOnPath = true;
|
onPath = true;
|
||||||
pathWindingL += winding;
|
pathWindingL += winding;
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
}
|
}
|
||||||
|
@ -9907,7 +9911,7 @@ PathItem.inject(new function() {
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
}
|
}
|
||||||
} else if (a3Prev < paL && a > paL || a3Prev > paR && a < paR) {
|
} else if (a3Prev < paL && a > paL || a3Prev > paR && a < paR) {
|
||||||
isOnPath = true;
|
onPath = true;
|
||||||
if (a3Prev < paL) {
|
if (a3Prev < paL) {
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
} else if (a3Prev > paR) {
|
} else if (a3Prev > paR) {
|
||||||
|
@ -9974,7 +9978,7 @@ PathItem.inject(new function() {
|
||||||
handleCurve(vClose);
|
handleCurve(vClose);
|
||||||
vClose = null;
|
vClose = null;
|
||||||
}
|
}
|
||||||
if (!pathWindingL && !pathWindingR && isOnPath) {
|
if (!pathWindingL && !pathWindingR && onPath) {
|
||||||
var add = path.isClockwise() ^ dir ? 1 : -1;
|
var add = path.isClockwise() ^ dir ? 1 : -1;
|
||||||
windingL += add;
|
windingL += add;
|
||||||
windingR -= add;
|
windingR -= add;
|
||||||
|
@ -9984,7 +9988,9 @@ PathItem.inject(new function() {
|
||||||
windingR += pathWindingR;
|
windingR += pathWindingR;
|
||||||
pathWindingL = pathWindingR = 0;
|
pathWindingL = pathWindingR = 0;
|
||||||
}
|
}
|
||||||
isOnPath = false;
|
if (onPath)
|
||||||
|
onPathCount++;
|
||||||
|
onPath = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!windingL && !windingR) {
|
if (!windingL && !windingR) {
|
||||||
|
@ -9994,7 +10000,10 @@ PathItem.inject(new function() {
|
||||||
windingR = windingR && (2 - abs(windingR) % 2);
|
windingR = windingR && (2 - abs(windingR) % 2);
|
||||||
return {
|
return {
|
||||||
winding: max(windingL, windingR),
|
winding: max(windingL, windingR),
|
||||||
contour: !windingL ^ !windingR
|
windingL: windingL,
|
||||||
|
windingR: windingR,
|
||||||
|
onContour: !windingL ^ !windingR,
|
||||||
|
onPathCount: onPathCount
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10025,8 +10034,8 @@ PathItem.inject(new function() {
|
||||||
if (parent instanceof CompoundPath)
|
if (parent instanceof CompoundPath)
|
||||||
path = parent;
|
path = parent;
|
||||||
winding = !(operator.subtract && path2 && (
|
winding = !(operator.subtract && path2 && (
|
||||||
path === path1 && path2._getWinding(pt, dir) ||
|
path === path1 && path2._getWinding(pt, dir).winding ||
|
||||||
path === path2 && !path1._getWinding(pt, dir)))
|
path === path2 && !path1._getWinding(pt, dir).winding))
|
||||||
? getWinding(pt, curves, dir)
|
? getWinding(pt, curves, dir)
|
||||||
: { winding: 0 };
|
: { winding: 0 };
|
||||||
break;
|
break;
|
||||||
|
@ -10034,9 +10043,7 @@ PathItem.inject(new function() {
|
||||||
length -= curveLength;
|
length -= curveLength;
|
||||||
}
|
}
|
||||||
for (var j = chain.length - 1; j >= 0; j--) {
|
for (var j = chain.length - 1; j >= 0; j--) {
|
||||||
var seg = chain[j].segment;
|
chain[j].segment._winding = winding;
|
||||||
seg._winding = winding.winding;
|
|
||||||
seg._contour = winding.contour;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10046,9 +10053,10 @@ PathItem.inject(new function() {
|
||||||
otherStart;
|
otherStart;
|
||||||
|
|
||||||
function isValid(seg, excludeContour) {
|
function isValid(seg, excludeContour) {
|
||||||
|
var winding;
|
||||||
return !!(seg && !seg._visited && (!operator
|
return !!(seg && !seg._visited && (!operator
|
||||||
|| operator[seg._winding]
|
|| operator[(winding = seg._winding).winding]
|
||||||
|| !excludeContour && operator.unite && seg._contour));
|
|| !excludeContour && operator.unite && winding.onContour));
|
||||||
}
|
}
|
||||||
|
|
||||||
function isStart(seg) {
|
function isStart(seg) {
|
||||||
|
@ -10177,7 +10185,7 @@ PathItem.inject(new function() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_getWinding: function(point, dir) {
|
_getWinding: function(point, dir) {
|
||||||
return getWinding(point, this.getCurves(), dir).winding;
|
return getWinding(point, this.getCurves(), dir);
|
||||||
},
|
},
|
||||||
|
|
||||||
unite: function(path) {
|
unite: function(path) {
|
||||||
|
|
8
dist/paper-core.min.js
vendored
8
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
46
dist/paper-full.js
vendored
46
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Date: Fri Jul 22 14:21:35 2016 +0200
|
* Date: Fri Jul 22 15:46:42 2016 +0200
|
||||||
*
|
*
|
||||||
***
|
***
|
||||||
*
|
*
|
||||||
|
@ -7565,8 +7565,11 @@ var PathItem = Item.extend({
|
||||||
_contains: function(point) {
|
_contains: function(point) {
|
||||||
var winding = point.isInside(
|
var winding = point.isInside(
|
||||||
this.getBounds({ internal: true, handle: true }))
|
this.getBounds({ internal: true, handle: true }))
|
||||||
&& this._getWinding(point);
|
? this._getWinding(point)
|
||||||
return !!(this.getFillRule() === 'evenodd' ? winding & 1 : winding);
|
: {};
|
||||||
|
return !!(this.getFillRule() === 'evenodd'
|
||||||
|
? winding.windingL & 1 || winding.windingR & 1
|
||||||
|
: winding.winding);
|
||||||
},
|
},
|
||||||
|
|
||||||
getIntersections: function(path, include, _matrix, _returnFirst) {
|
getIntersections: function(path, include, _matrix, _returnFirst) {
|
||||||
|
@ -9730,7 +9733,7 @@ PathItem.inject(new function() {
|
||||||
if (!(inter && inter._overlap)) {
|
if (!(inter && inter._overlap)) {
|
||||||
var path = segment._path;
|
var path = segment._path;
|
||||||
path._overlapsOnly = false;
|
path._overlapsOnly = false;
|
||||||
if (operator[segment._winding])
|
if (operator[segment._winding.winding])
|
||||||
path._validOverlapsOnly = false;
|
path._validOverlapsOnly = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9858,7 +9861,8 @@ PathItem.inject(new function() {
|
||||||
pathWindingL = 0,
|
pathWindingL = 0,
|
||||||
pathWindingR = 0,
|
pathWindingR = 0,
|
||||||
onPathWinding = 0,
|
onPathWinding = 0,
|
||||||
isOnPath = false,
|
onPathCount = 0,
|
||||||
|
onPath = false,
|
||||||
vPrev,
|
vPrev,
|
||||||
vClose;
|
vClose;
|
||||||
|
|
||||||
|
@ -9874,7 +9878,7 @@ PathItem.inject(new function() {
|
||||||
a3 = v[ia + 6];
|
a3 = v[ia + 6];
|
||||||
if (o0 === o3) {
|
if (o0 === o3) {
|
||||||
if (a1 < paR && a3 > paL || a3 < paR && a1 > paL) {
|
if (a1 < paR && a3 > paL || a3 < paR && a1 > paL) {
|
||||||
isOnPath = true;
|
onPath = true;
|
||||||
}
|
}
|
||||||
return vPrev;
|
return vPrev;
|
||||||
}
|
}
|
||||||
|
@ -9895,7 +9899,7 @@ PathItem.inject(new function() {
|
||||||
} else if (a > paR) {
|
} else if (a > paR) {
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
} else {
|
} else {
|
||||||
isOnPath = true;
|
onPath = true;
|
||||||
pathWindingL += winding;
|
pathWindingL += winding;
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
}
|
}
|
||||||
|
@ -9907,7 +9911,7 @@ PathItem.inject(new function() {
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
}
|
}
|
||||||
} else if (a3Prev < paL && a > paL || a3Prev > paR && a < paR) {
|
} else if (a3Prev < paL && a > paL || a3Prev > paR && a < paR) {
|
||||||
isOnPath = true;
|
onPath = true;
|
||||||
if (a3Prev < paL) {
|
if (a3Prev < paL) {
|
||||||
pathWindingR += winding;
|
pathWindingR += winding;
|
||||||
} else if (a3Prev > paR) {
|
} else if (a3Prev > paR) {
|
||||||
|
@ -9974,7 +9978,7 @@ PathItem.inject(new function() {
|
||||||
handleCurve(vClose);
|
handleCurve(vClose);
|
||||||
vClose = null;
|
vClose = null;
|
||||||
}
|
}
|
||||||
if (!pathWindingL && !pathWindingR && isOnPath) {
|
if (!pathWindingL && !pathWindingR && onPath) {
|
||||||
var add = path.isClockwise() ^ dir ? 1 : -1;
|
var add = path.isClockwise() ^ dir ? 1 : -1;
|
||||||
windingL += add;
|
windingL += add;
|
||||||
windingR -= add;
|
windingR -= add;
|
||||||
|
@ -9984,7 +9988,9 @@ PathItem.inject(new function() {
|
||||||
windingR += pathWindingR;
|
windingR += pathWindingR;
|
||||||
pathWindingL = pathWindingR = 0;
|
pathWindingL = pathWindingR = 0;
|
||||||
}
|
}
|
||||||
isOnPath = false;
|
if (onPath)
|
||||||
|
onPathCount++;
|
||||||
|
onPath = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!windingL && !windingR) {
|
if (!windingL && !windingR) {
|
||||||
|
@ -9994,7 +10000,10 @@ PathItem.inject(new function() {
|
||||||
windingR = windingR && (2 - abs(windingR) % 2);
|
windingR = windingR && (2 - abs(windingR) % 2);
|
||||||
return {
|
return {
|
||||||
winding: max(windingL, windingR),
|
winding: max(windingL, windingR),
|
||||||
contour: !windingL ^ !windingR
|
windingL: windingL,
|
||||||
|
windingR: windingR,
|
||||||
|
onContour: !windingL ^ !windingR,
|
||||||
|
onPathCount: onPathCount
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10025,8 +10034,8 @@ PathItem.inject(new function() {
|
||||||
if (parent instanceof CompoundPath)
|
if (parent instanceof CompoundPath)
|
||||||
path = parent;
|
path = parent;
|
||||||
winding = !(operator.subtract && path2 && (
|
winding = !(operator.subtract && path2 && (
|
||||||
path === path1 && path2._getWinding(pt, dir) ||
|
path === path1 && path2._getWinding(pt, dir).winding ||
|
||||||
path === path2 && !path1._getWinding(pt, dir)))
|
path === path2 && !path1._getWinding(pt, dir).winding))
|
||||||
? getWinding(pt, curves, dir)
|
? getWinding(pt, curves, dir)
|
||||||
: { winding: 0 };
|
: { winding: 0 };
|
||||||
break;
|
break;
|
||||||
|
@ -10034,9 +10043,7 @@ PathItem.inject(new function() {
|
||||||
length -= curveLength;
|
length -= curveLength;
|
||||||
}
|
}
|
||||||
for (var j = chain.length - 1; j >= 0; j--) {
|
for (var j = chain.length - 1; j >= 0; j--) {
|
||||||
var seg = chain[j].segment;
|
chain[j].segment._winding = winding;
|
||||||
seg._winding = winding.winding;
|
|
||||||
seg._contour = winding.contour;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10046,9 +10053,10 @@ PathItem.inject(new function() {
|
||||||
otherStart;
|
otherStart;
|
||||||
|
|
||||||
function isValid(seg, excludeContour) {
|
function isValid(seg, excludeContour) {
|
||||||
|
var winding;
|
||||||
return !!(seg && !seg._visited && (!operator
|
return !!(seg && !seg._visited && (!operator
|
||||||
|| operator[seg._winding]
|
|| operator[(winding = seg._winding).winding]
|
||||||
|| !excludeContour && operator.unite && seg._contour));
|
|| !excludeContour && operator.unite && winding.onContour));
|
||||||
}
|
}
|
||||||
|
|
||||||
function isStart(seg) {
|
function isStart(seg) {
|
||||||
|
@ -10177,7 +10185,7 @@ PathItem.inject(new function() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_getWinding: function(point, dir) {
|
_getWinding: function(point, dir) {
|
||||||
return getWinding(point, this.getCurves(), dir).winding;
|
return getWinding(point, this.getCurves(), dir);
|
||||||
},
|
},
|
||||||
|
|
||||||
unite: function(path) {
|
unite: function(path) {
|
||||||
|
|
6
dist/paper-full.min.js
vendored
6
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue