aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkPathOpsCubic.h
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/SkPathOpsCubic.h
parent30297c53bd233a6d9af7b422ad8a17912f1ef5e6 (diff)
use pathops utils to improve precision of cubic chopping in scan converter
Diffstat (limited to 'src/pathops/SkPathOpsCubic.h')
-rw-r--r--src/pathops/SkPathOpsCubic.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pathops/SkPathOpsCubic.h b/src/pathops/SkPathOpsCubic.h
index f9d291056e..3d68151852 100644
--- a/src/pathops/SkPathOpsCubic.h
+++ b/src/pathops/SkPathOpsCubic.h
@@ -97,6 +97,17 @@ struct SkDCubic {
int searchRoots(double extremes[6], int extrema, double axisIntercept,
SearchAxis xAxis, double* validRoots) const;
+ /**
+ * Return the number of valid roots (0 < root < 1) for this cubic intersecting the
+ * specified horizontal line.
+ */
+ int horizontalIntersect(double yIntercept, double roots[3]) const;
+ /**
+ * Return the number of valid roots (0 < root < 1) for this cubic intersecting the
+ * specified vertical line.
+ */
+ int verticalIntersect(double xIntercept, double roots[3]) const;
+
const SkDCubic& set(const SkPoint pts[kPointCount]) {
fPts[0] = pts[0];
fPts[1] = pts[1];