From 19c9a0e7221db760de3e0e06297f114f5c7ba4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 13 Sep 2015 11:52:17 +0200 Subject: [PATCH] Use the correct points on curve2 when checking intersections at beginnings and ends. --- src/path/Curve.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/path/Curve.js b/src/path/Curve.js index 58eb50b3..0de4a154 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -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; },