aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkDCubicLineIntersection.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-04-30 07:47:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-30 07:47:13 -0700
commitdc3088570f945ed0ede84f0af0016eedc267dda3 (patch)
treed502affda882bef7083b6cf3cce68c1029596a0e /src/pathops/SkDCubicLineIntersection.cpp
parent30297c53bd233a6d9af7b422ad8a17912f1ef5e6 (diff)
use pathops utils to improve precision of cubic chopping in scan converter
Diffstat (limited to 'src/pathops/SkDCubicLineIntersection.cpp')
-rw-r--r--src/pathops/SkDCubicLineIntersection.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pathops/SkDCubicLineIntersection.cpp b/src/pathops/SkDCubicLineIntersection.cpp
index f658b09f0b..ee1e3d3a34 100644
--- a/src/pathops/SkDCubicLineIntersection.cpp
+++ b/src/pathops/SkDCubicLineIntersection.cpp
@@ -425,3 +425,13 @@ int SkIntersections::intersectRay(const SkDCubic& cubic, const SkDLine& line) {
}
return fUsed;
}
+
+// SkDCubic accessors to Intersection utilities
+
+int SkDCubic::horizontalIntersect(double yIntercept, double roots[3]) const {
+ return LineCubicIntersections::HorizontalIntersect(*this, yIntercept, roots);
+}
+
+int SkDCubic::verticalIntersect(double xIntercept, double roots[3]) const {
+ return LineCubicIntersections::VerticalIntersect(*this, xIntercept, roots);
+}