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

Unified Diff: sky/examples/raw/painting.sky

Issue 1143133007: Revert "Add a Color class to dart:sky." (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/raw/painting.sky
diff --git a/sky/examples/raw/painting.sky b/sky/examples/raw/painting.sky
index 195cdf0c702d02f5a0cb78fb5df1d2170d97d384..fcfa3d56b36c118e1bfa33384f64c37b5c44cbe1 100644
--- a/sky/examples/raw/painting.sky
+++ b/sky/examples/raw/painting.sky
@@ -22,7 +22,7 @@ void main() {
context.clipRect(new Rect.fromLTRB(0.0, 0.0, context.width, radius));
context.translate(mid.x, mid.y);
- paint.color = const Color.fromARGB(128, 255, 0, 255);
+ paint.setARGB(128, 255, 0, 255);
context.rotateDegrees(45.0);
context.drawRect(new Rect.fromLTRB(-radius, -radius, radius, radius),
@@ -35,7 +35,7 @@ void main() {
0.0, 0.0, 1.0
];
context.concat(scaleMatrix);
- paint.color = const Color.fromARGB(128, 0, 255, 0);
+ paint.setARGB(128, 0, 255, 0);
context.drawCircle(0.0, 0.0, radius, paint);
context.restore();
@@ -46,19 +46,19 @@ void main() {
new DrawLooperLayerInfo()
..setOffset(150.0, 0.0)..setPaintBits(-1)..setColorMode(1),
(Paint layerPaint) {
- layerPaint.color = const Color.fromARGB(128, 255, 255, 0);
+ layerPaint.setARGB(128, 255, 255, 0);
layerPaint.setColorFilter(new ColorFilter(0x770000ff, 5));
})
..addLayerOnTop(
new DrawLooperLayerInfo()..setOffset(75.0, 75.0)..setColorMode(1),
(Paint layerPaint) {
- layerPaint.color = const Color.fromARGB(128, 255, 0, 0);
+ layerPaint.setARGB(128, 255, 0, 0);
})
..addLayerOnTop(
new DrawLooperLayerInfo()..setOffset(225.0, 75.0),
(Paint layerPaint) {
// Since this layer uses a DST color mode, this has no effect.
- layerPaint.color = const Color.fromARGB(128, 255, 0, 0);
+ layerPaint.setARGB(128, 255, 0, 0);
});
paint.setDrawLooper(builder.build());
context.drawCircle(0.0, 0.0, radius, paint);
« no previous file with comments | « sky/engine/core/script/dom_dart_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698