Index: sky/engine/core/painting/Point.dart |
diff --git a/sky/engine/core/painting/Point.dart b/sky/engine/core/painting/Point.dart |
index bb2cbd95c6984efbe1d98a2045bbb29ae786176a..bd404c740f5123e19e54b7b4b04faf4ca941c76a 100644 |
--- a/sky/engine/core/painting/Point.dart |
+++ b/sky/engine/core/painting/Point.dart |
@@ -14,11 +14,12 @@ class Point { |
static const Point origin = const Point(0.0, 0.0); |
bool operator ==(other) => other is Point && x == other.x && y == other.y; |
- Size operator -(Point other) => new Size(x - other.x, y - other.y); |
- Point operator +(Size size) => new Point(x + size.width, y + size.height); |
+ Point operator -() => new Point(-x, -y); |
+ Offset operator -(Point other) => new Offset(x - other.x, y - other.y); |
+ Point operator +(Offset other) => new Point(x + other.dx, y + other.dy); |
- // does the equivalent of "return this - Point(0,0)" |
- Size toSize() => new Size(x, y); |
+ // does the equivalent of "return this - Point.origin" |
+ Offset toOffset() => new Offset(x, y); |
int get hashCode { |
int result = 373; |