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

Unified Diff: sky/examples/raw/ink_well.dart

Issue 1159663003: Re-land "Add a Color class to dart:sky." (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: ink_well Created 5 years, 7 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/script/dom_dart_state.cc ('k') | sky/examples/raw/painting.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/raw/ink_well.dart
diff --git a/sky/examples/raw/ink_well.dart b/sky/examples/raw/ink_well.dart
index 0ada57e7c0ed25fd8c6c65c6e904a7c13305b487..ebdee701b958922135e799bc8aa49e0b89eebded 100644
--- a/sky/examples/raw/ink_well.dart
+++ b/sky/examples/raw/ink_well.dart
@@ -33,7 +33,7 @@ class InkSplash {
void paint(RenderNodeDisplayList canvas) {
int opacity = (_kInitialOpacity * (1.0 - (radius.value / _kTargetSize))).floor();
- _paint.color = opacity << 24;
+ _paint.color = new sky.Color(opacity << 24);
canvas.drawCircle(position.x, position.y, radius.value, _paint);
}
}
@@ -57,7 +57,7 @@ class InkWell extends RenderBox {
void paint(RenderNodeDisplayList canvas) {
canvas.drawRect(new sky.Rect.fromLTRB(0.0, 0.0, size.width, size.height),
- new sky.Paint()..color = 0xFFCCCCCC);
+ new sky.Paint()..color = const sky.Color(0xFFCCCCCC));
for (InkSplash splash in _splashes)
splash.paint(canvas);
}
« no previous file with comments | « sky/engine/core/script/dom_dart_state.cc ('k') | sky/examples/raw/painting.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698