aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkPathOpsPoint.h
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-04-23 09:13:37 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-23 09:13:37 -0700
commit03b03cad01628146bbb8d4f33c073bd0c77ee558 (patch)
tree3daa35fc7a85abd54f6d48e23d3f8f665b677dc5 /src/pathops/SkPathOpsPoint.h
parent4b17fa353e777de309ca8b0706f1d3e326b59822 (diff)
working on initial winding for cubics
Path ops works well for all tests except for cubics. Isolate failures caused by cubics, and do a better job of computing the initial winding for cubics. TBR=reed@google.com BUG=skia:3588 Review URL: https://codereview.chromium.org/1096923003
Diffstat (limited to 'src/pathops/SkPathOpsPoint.h')
-rw-r--r--src/pathops/SkPathOpsPoint.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pathops/SkPathOpsPoint.h b/src/pathops/SkPathOpsPoint.h
index 35ad80ea4c..c596b91cc0 100644
--- a/src/pathops/SkPathOpsPoint.h
+++ b/src/pathops/SkPathOpsPoint.h
@@ -115,6 +115,20 @@ struct SkDPoint {
fY -= v.fY;
}
+ // only used by testing
+ SkDPoint operator+(const SkDVector& v) {
+ SkDPoint result = *this;
+ result += v;
+ return result;
+ }
+
+ // only used by testing
+ SkDPoint operator-(const SkDVector& v) {
+ SkDPoint result = *this;
+ result -= v;
+ return result;
+ }
+
// note: this can not be implemented with
// return approximately_equal(a.fY, fY) && approximately_equal(a.fX, fX);
// because that will not take the magnitude of the values into account