Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(711)

Unified Diff: sky/engine/core/painting/Point.dart

Issue 1166183002: Add Point.origin for new Point(0.0, 0.0) (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/examples/raw/sector_layout.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Point.dart
diff --git a/sky/engine/core/painting/Point.dart b/sky/engine/core/painting/Point.dart
index 418660537be7c5d2abe6f0cd2fff947609ddce59..169edd6959605d0f550df1ec9894da4a8f2a1418 100644
--- a/sky/engine/core/painting/Point.dart
+++ b/sky/engine/core/painting/Point.dart
@@ -15,6 +15,8 @@ class Point {
Size operator -(Point other) => new Size(x - other.x, y - other.y);
Point operator +(Size size) => new Point(x + size.width, y + size.height);
+ static const Point origin = const Point(0.0, 0.0);
+
// does the equivalent of "return this - Point(0,0)"
Size toSize() => new Size(x, y);
« no previous file with comments | « no previous file | sky/examples/raw/sector_layout.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698