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

Unified Diff: sky/examples/raw/hello_world.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/examples/raw/draw_picture_into_canvas.sky ('k') | sky/examples/raw/paint_element_into_displaylist.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/raw/hello_world.dart
diff --git a/sky/examples/raw/hello_world.dart b/sky/examples/raw/hello_world.dart
index 61079b5927d1499bed8cffd54005c272ee6beb60..7e8e342bf2bf3a10ca759cd97ca33803e01e400f 100644
--- a/sky/examples/raw/hello_world.dart
+++ b/sky/examples/raw/hello_world.dart
@@ -12,7 +12,7 @@ Picture draw(int a, int r, int g, int b) {
PictureRecorder recorder = new PictureRecorder(width, height);
double radius = min(width, height) * 0.45;
- Paint paint = new Paint()..setARGB(a, r, g, b);
+ Paint paint = new Paint()..color = Color.fromARGB(a, r, g, b);
recorder.drawCircle(width / 2, height / 2, radius, paint);
return recorder.endRecording();
}
« no previous file with comments | « sky/examples/raw/draw_picture_into_canvas.sky ('k') | sky/examples/raw/paint_element_into_displaylist.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698