Index: src/pathops/SkDConicLineIntersection.cpp |
diff --git a/src/pathops/SkDConicLineIntersection.cpp b/src/pathops/SkDConicLineIntersection.cpp |
index 710647236cb56c2565ece34bba060c066bad7f35..be55567f2c730466e859e628ba0b90128c94524b 100644 |
--- a/src/pathops/SkDConicLineIntersection.cpp |
+++ b/src/pathops/SkDConicLineIntersection.cpp |
@@ -6,6 +6,7 @@ |
*/ |
#include "SkIntersections.h" |
#include "SkPathOpsConic.h" |
+#include "SkPathOpsCurve.h" |
#include "SkPathOpsLine.h" |
class LineConicIntersections { |
@@ -199,7 +200,22 @@ protected: |
} |
fIntersections->insert(conicT, lineT, fConic[cIndex]); |
} |
- // FIXME: see if line end is nearly on conic |
+ addLineNearEndPoints(); |
+ } |
+ |
+ void addLineNearEndPoints() { |
+ for (int lIndex = 0; lIndex < 2; ++lIndex) { |
+ double lineT = (double) lIndex; |
+ if (fIntersections->hasOppT(lineT)) { |
+ continue; |
+ } |
+ double conicT = ((SkDCurve*) &fConic)->nearPoint(SkPath::kConic_Verb, |
+ (*fLine)[lIndex], (*fLine)[!lIndex]); |
+ if (conicT < 0) { |
+ continue; |
+ } |
+ fIntersections->insert(conicT, lineT, (*fLine)[lIndex]); |
+ } |
} |
void addExactHorizontalEndPoints(double left, double right, double y) { |
@@ -225,7 +241,7 @@ protected: |
} |
fIntersections->insert(conicT, lineT, fConic[cIndex]); |
} |
- // FIXME: see if line end is nearly on conic |
+ addLineNearEndPoints(); |
herb_g
2016/07/18 15:13:38
this->?
caryclark
2016/07/18 15:55:49
Done.
|
} |
void addExactVerticalEndPoints(double top, double bottom, double x) { |
@@ -251,7 +267,7 @@ protected: |
} |
fIntersections->insert(conicT, lineT, fConic[cIndex]); |
} |
- // FIXME: see if line end is nearly on conic |
+ addLineNearEndPoints(); |
} |
double findLineT(double t) { |