aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkPathOpsPoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathops/SkPathOpsPoint.cpp')
-rw-r--r--src/pathops/SkPathOpsPoint.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/pathops/SkPathOpsPoint.cpp b/src/pathops/SkPathOpsPoint.cpp
new file mode 100644
index 0000000000..dc9cde55a3
--- /dev/null
+++ b/src/pathops/SkPathOpsPoint.cpp
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#include "SkPathOpsPoint.h"
+
+SkDVector operator-(const SkDPoint& a, const SkDPoint& b) {
+ SkDVector v = {a.fX - b.fX, a.fY - b.fY};
+ return v;
+}
+
+SkDPoint operator+(const SkDPoint& a, const SkDVector& b) {
+ SkDPoint v = {a.fX + b.fX, a.fY + b.fY};
+ return v;
+}