Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1355)

Unified Diff: src/pathops/SkPathOpsCurve.cpp

Issue 2338323002: quad and conic do not intersect (Closed)
Patch Set: turn off under development Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | src/pathops/SkPathOpsDebug.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkPathOpsCurve.cpp
diff --git a/src/pathops/SkPathOpsCurve.cpp b/src/pathops/SkPathOpsCurve.cpp
index 4bc518a3bc0cbf0f85387114a4432ce1ad19b53c..e96c4e89dda0d7feedfe0ce2eaa11a5ad6289445 100644
--- a/src/pathops/SkPathOpsCurve.cpp
+++ b/src/pathops/SkPathOpsCurve.cpp
@@ -14,7 +14,7 @@ double SkDCurve::nearPoint(SkPath::Verb verb, const SkDPoint& xy, const SkDPoint
int count = SkPathOpsVerbToPoints(verb);
double minX = fCubic.fPts[0].fX;
double maxX = minX;
- for (int index = 0; index < count; ++index) {
+ for (int index = 1; index <= count; ++index) {
minX = SkTMin(minX, fCubic.fPts[index].fX);
maxX = SkTMax(maxX, fCubic.fPts[index].fX);
}
@@ -23,7 +23,7 @@ double SkDCurve::nearPoint(SkPath::Verb verb, const SkDPoint& xy, const SkDPoint
}
double minY = fCubic.fPts[0].fY;
double maxY = minY;
- for (int index = 0; index < count; ++index) {
+ for (int index = 1; index <= count; ++index) {
minY = SkTMin(minY, fCubic.fPts[index].fY);
maxY = SkTMax(maxY, fCubic.fPts[index].fY);
}
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | src/pathops/SkPathOpsDebug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698