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

Unified Diff: sky/examples/game/lib/sprite.dart

Issue 1182563002: Remove redundant Paint.setARGB in favor of assigning to Paint.color. (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 | « sky/engine/core/painting/Paint.idl ('k') | sky/examples/raw/circle.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/game/lib/sprite.dart
diff --git a/sky/examples/game/lib/sprite.dart b/sky/examples/game/lib/sprite.dart
index 5a4efba11062ee45e94c534524be7a275dc6c6b0..2ddbbfdc6a4ef43b2e3448cb9351ec2e93de76f0 100644
--- a/sky/examples/game/lib/sprite.dart
+++ b/sky/examples/game/lib/sprite.dart
@@ -53,7 +53,7 @@ class Sprite extends NodeWithSize {
// Setup paint object for opacity and transfer mode
Paint paint = new Paint();
- paint.setARGB((255.0*_opacity).toInt(), 255, 255, 255);
+ paint.color = Color.fromARGB((255.0*_opacity).toInt(), 255, 255, 255);
if (colorOverlay != null) {
paint.setColorFilter(new ColorFilter.mode(colorOverlay, TransferMode.srcATopMode));
}
@@ -66,7 +66,7 @@ class Sprite extends NodeWithSize {
else {
// Paint a red square for missing texture
canvas.drawRect(new Rect.fromLTRB(0.0, 0.0, size.width, size.height),
- new Paint()..setARGB(255, 255, 0, 0));
+ new Paint()..color = Color.fromARGB(255, 255, 0, 0));
}
canvas.restore();
}
« no previous file with comments | « sky/engine/core/painting/Paint.idl ('k') | sky/examples/raw/circle.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698