diff options
Diffstat (limited to 'src/pathops/SkDLineIntersection.cpp')
-rw-r--r-- | src/pathops/SkDLineIntersection.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pathops/SkDLineIntersection.cpp b/src/pathops/SkDLineIntersection.cpp index f10b440404..f1adce2100 100644 --- a/src/pathops/SkDLineIntersection.cpp +++ b/src/pathops/SkDLineIntersection.cpp @@ -76,6 +76,12 @@ int SkIntersections::intersectRay(const SkDLine& a, const SkDLine& b) { SkDVector ab0 = a[0] - b[0]; double numerA = ab0.fY * bLen.fX - bLen.fY * ab0.fX; double numerB = ab0.fY * aLen.fX - aLen.fY * ab0.fX; +#if 0 + if (!between(0, numerA, denom) || !between(0, numerB, denom)) { + fUsed = 0; + return 0; + } +#endif numerA /= denom; numerB /= denom; int used; @@ -198,7 +204,7 @@ int SkIntersections::horizontal(const SkDLine& line, double y) { int SkIntersections::horizontal(const SkDLine& line, double left, double right, double y, bool flipped) { - fMax = 2; + fMax = 3; // clean up parallel at the end will limit the result to 2 at the most // see if end points intersect the opposite line double t; const SkDPoint leftPt = { left, y }; |