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

Unified Diff: src/pathops/SkDLineIntersection.cpp

Issue 1111333002: compute initial winding from projected rays (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add missing test reference Created 5 years, 7 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/SkDConicLineIntersection.cpp ('k') | src/pathops/SkDQuadLineIntersection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkDLineIntersection.cpp
diff --git a/src/pathops/SkDLineIntersection.cpp b/src/pathops/SkDLineIntersection.cpp
index ed96b9c5d7997033d92f4e1c630c50e2814546e6..5fd8e7fdb7f73b2e751d34a1c05051243e68b7f6 100644
--- a/src/pathops/SkDLineIntersection.cpp
+++ b/src/pathops/SkDLineIntersection.cpp
@@ -188,7 +188,7 @@ static int horizontal_coincident(const SkDLine& line, double y) {
return 1;
}
-static double horizontal_intercept(const SkDLine& line, double y) {
+double SkIntersections::HorizontalIntercept(const SkDLine& line, double y) {
return SkPinT((y - line[0].fY) / (line[1].fY - line[0].fY));
}
@@ -214,7 +214,7 @@ int SkIntersections::horizontal(const SkDLine& line, double left, double right,
}
int result = horizontal_coincident(line, y);
if (result == 1 && fUsed == 0) {
- fT[0][0] = horizontal_intercept(line, y);
+ fT[0][0] = HorizontalIntercept(line, y);
double xIntercept = line[0].fX + fT[0][0] * (line[1].fX - line[0].fX);
if (between(left, xIntercept, right)) {
fT[1][0] = (xIntercept - left) / (right - left);
@@ -264,7 +264,7 @@ static int vertical_coincident(const SkDLine& line, double x) {
return 1;
}
-static double vertical_intercept(const SkDLine& line, double x) {
+double SkIntersections::VerticalIntercept(const SkDLine& line, double x) {
return SkPinT((x - line[0].fX) / (line[1].fX - line[0].fX));
}
@@ -290,7 +290,7 @@ int SkIntersections::vertical(const SkDLine& line, double top, double bottom,
}
int result = vertical_coincident(line, x);
if (result == 1 && fUsed == 0) {
- fT[0][0] = vertical_intercept(line, x);
+ fT[0][0] = VerticalIntercept(line, x);
double yIntercept = line[0].fY + fT[0][0] * (line[1].fY - line[0].fY);
if (between(top, yIntercept, bottom)) {
fT[1][0] = (yIntercept - top) / (bottom - top);
« no previous file with comments | « src/pathops/SkDConicLineIntersection.cpp ('k') | src/pathops/SkDQuadLineIntersection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698