mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-14 00:39:57 -04:00
Boolean -fix: Preserve the order of intersections found (Curve-Line) according to the PathItem they belong to.
This commit is contained in:
parent
abe0e5e059
commit
669fb1638a
1 changed files with 6 additions and 5 deletions
|
@ -1394,11 +1394,12 @@ new function() { // Scope for methods that require numerical integration
|
|||
// We do have a point on the infinite line. Check if it falls on
|
||||
// the line *segment*.
|
||||
if (point.x >= 0 && point.x <= rl2x)
|
||||
addLocation(locations,
|
||||
flip ? curve2 : curve1,
|
||||
// The actual intersection point
|
||||
t, Curve.evaluate(vc, t, 0),
|
||||
flip ? curve1 : curve2);
|
||||
if(flip)
|
||||
addLocation(locations, curve1, undefined, Curve.evaluate(vc, t, 0),
|
||||
curve2, t, Curve.evaluate(vc, t, 0));
|
||||
else
|
||||
addLocation(locations, curve1, t,
|
||||
Curve.evaluate(vc, t, 0), curve2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue