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

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

Issue 1172173002: Clean up a bunch of our Dart code. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: upstream merge 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 | « sky/engine/core/painting/Color.dart ('k') | sky/engine/core/painting/Rect.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 169edd6959605d0f550df1ec9894da4a8f2a1418..bb2cbd95c6984efbe1d98a2045bbb29ae786176a 100644
--- a/sky/engine/core/painting/Point.dart
+++ b/sky/engine/core/painting/Point.dart
@@ -6,17 +6,17 @@ part of dart.sky;
/// Holds 2 floating-point coordinates.
class Point {
+ const Point(this.x, this.y);
+
final double x;
final double y;
- const Point(this.x, this.y);
+ 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);
- 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 | « sky/engine/core/painting/Color.dart ('k') | sky/engine/core/painting/Rect.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698