diff options
author | reed <reed@google.com> | 2015-04-30 07:47:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-30 07:47:13 -0700 |
commit | dc3088570f945ed0ede84f0af0016eedc267dda3 (patch) | |
tree | d502affda882bef7083b6cf3cce68c1029596a0e /src/pathops/SkDCubicLineIntersection.cpp | |
parent | 30297c53bd233a6d9af7b422ad8a17912f1ef5e6 (diff) |
use pathops utils to improve precision of cubic chopping in scan converter
BUG=skia:
Review URL: https://codereview.chromium.org/1113963002
Diffstat (limited to 'src/pathops/SkDCubicLineIntersection.cpp')
-rw-r--r-- | src/pathops/SkDCubicLineIntersection.cpp | 10 |
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); +} |