Skip to content

Commit ef97294

Browse files
committed
Merge branch 'refs/heads/intersect-fix'
Conflicts: src/path/Curve.js
2 parents 63e4bd5 + ac04029 commit ef97294

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/path/Curve.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,11 +1455,12 @@ new function() { // Scope for methods that require numerical integration
14551455
// happen with lines, in which case we should not be here.
14561456
for (var i = 0; i < count; i++) {
14571457
var tc = roots[i],
1458-
point = Curve.evaluate(vc, tc, 0),
1458+
point = Curve.evaluate(vcr, tc, 0),
14591459
tl = Curve.getParameterOf(vl, point.x, point.y);
14601460
// We do have a point on the infinite line. Check if it falls on
14611461
// the line *segment*.
1462-
if (tl >= 0 && tl <= 1) {
1462+
if (point.x >= 0 && point.x <= rl2x){
1463+
var tl = Curve.getParameterOf([0, 0, 0, 0, rl2x, 0, rl2x, 0], point.x, 0);
14631464
// Interpolate the parameter for the intersection on line.
14641465
var t1 = flip ? tl : tc,
14651466
t2 = flip ? tc : tl;

0 commit comments

Comments
 (0)