mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Merge pull request #798 from iconexperience/Improve-clipConvexHullPart
Improve clipConvexHullPart()
This commit is contained in:
commit
99d969e962
1 changed files with 3 additions and 1 deletions
|
@ -1593,7 +1593,9 @@ new function() { // Scope for intersection using bezier fat-line clipping
|
|||
for (var i = 1, l = part.length; i < l; i++) {
|
||||
var qx = part[i][0],
|
||||
qy = part[i][1];
|
||||
if (top ? qy >= threshold : qy <= threshold)
|
||||
if (qy == threshold) {
|
||||
return qx;
|
||||
} else if (top ? qy > threshold : qy < threshold)
|
||||
return px + (threshold - py) * (qx - px) / (qy - py);
|
||||
px = qx;
|
||||
py = qy;
|
||||
|
|
Loading…
Reference in a new issue