mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Use the correct points on curve2 when checking intersections at beginnings and ends.
This commit is contained in:
parent
d62caf6faa
commit
19c9a0e722
1 changed files with 4 additions and 4 deletions
|
@ -1706,9 +1706,9 @@ new function() { // Scope for intersection using bezier fat-line clipping
|
|||
// Handle the special case where the first curve's stat-point
|
||||
// overlaps with the second curve's start- or end-points.
|
||||
if (c1p1.isClose(c2p1, epsilon))
|
||||
addLocation(locations, param, v1, c1, 0, c1p1, v2, c2, 0, c1p1);
|
||||
addLocation(locations, param, v1, c1, 0, c1p1, v2, c2, 0, c2p1);
|
||||
if (!param.startConnected && c1p1.isClose(c2p2, epsilon))
|
||||
addLocation(locations, param, v1, c1, 0, c1p1, v2, c2, 1, c1p1);
|
||||
addLocation(locations, param, v1, c1, 0, c1p1, v2, c2, 1, c2p2);
|
||||
// Determine the correct intersection method based on whether one or
|
||||
// curves are straight lines:
|
||||
(straight1 && straight2
|
||||
|
@ -1724,9 +1724,9 @@ new function() { // Scope for intersection using bezier fat-line clipping
|
|||
// Handle the special case where the first curve's end-point
|
||||
// overlaps with the second curve's start- or end-points.
|
||||
if (!param.endConnected && c1p2.isClose(c2p1, epsilon))
|
||||
addLocation(locations, param, v1, c1, 1, c1p2, v2, c2, 0, c1p2);
|
||||
addLocation(locations, param, v1, c1, 1, c1p2, v2, c2, 0, c2p1);
|
||||
if (c1p2.isClose(c2p2, epsilon))
|
||||
addLocation(locations, param, v1, c1, 1, c1p2, v2, c2, 1, c1p2);
|
||||
addLocation(locations, param, v1, c1, 1, c1p2, v2, c2, 1, c2p2);
|
||||
return locations;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue