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

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

Issue 1209233002: Let's hide double.INFINITY a bit more, by providing cleaner APIs for the cases where we're currentl… (Closed) Base URL: https://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/widgets/styled_text.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Size.dart
diff --git a/sky/engine/core/painting/Size.dart b/sky/engine/core/painting/Size.dart
index fefdf4f329d8e244c8604d011bb9945c7fc97428..7738fd5559e81187505e0584a06f8185cc6c3cd4 100644
--- a/sky/engine/core/painting/Size.dart
+++ b/sky/engine/core/painting/Size.dart
@@ -22,6 +22,8 @@ class Size {
Size operator +(Size other) => new Size(width + other.width, height + other.height);
Size operator -(Size other) => new Size(width - other.width, height - other.height);
+ bool get isInfinite => width >= double.INFINITY || height >= double.INFINITY;
+
// does the equivalent of "return new Point(0,0) + this"
Point toPoint() => new Point(this.width, this.height);
« no previous file with comments | « no previous file | sky/examples/widgets/styled_text.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698