Use the correct points on curve2 when checking intersections at beginnings and ends.

This commit is contained in:
Jürg Lehni 2015-09-13 11:52:17 +02:00
parent d62caf6faa
commit 19c9a0e722

View file

@ -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;
},