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

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

Issue 1211603003: Baby steps towards an odeon-like animation system. First victim: Drawer. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: better lerp 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/sdk/BUILD.gn » ('j') | sky/sdk/lib/animation/animation_performance.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Offset.dart
diff --git a/sky/engine/core/painting/Offset.dart b/sky/engine/core/painting/Offset.dart
index 6bbbbc8eb99f1e3b9780051e796567ffd8d5fdcd..84dc4cc8a13c4a8f614fa8ebbe401f759a892a87 100644
--- a/sky/engine/core/painting/Offset.dart
+++ b/sky/engine/core/painting/Offset.dart
@@ -21,6 +21,7 @@ class Offset extends OffsetBase {
Offset operator -() => new Offset(-dx, -dy);
Offset operator -(Offset other) => new Offset(dx - other.dx, dy - other.dy);
Offset operator +(Offset other) => new Offset(dx + other.dx, dy + other.dy);
+ Offset operator *(double scale) => new Offset(dx * scale, dy * scale);
Hixie 2015/06/30 23:11:56 If you add *, also add /, ~/, and %. See Size.dart
Matt Perry 2015/07/01 18:17:43 Done.
Rect operator &(Size other) => new Rect.fromLTWH(dx, dy, other.width, other.height);
// does the equivalent of "return new Point(0,0) + this"
« no previous file with comments | « no previous file | sky/sdk/BUILD.gn » ('j') | sky/sdk/lib/animation/animation_performance.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698