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

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

Issue 1135283005: Sky: Add a CustomDart attribute to the IDL compiler, and use that with Canvas (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/painting/Canvas.idl ('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 6ff4002c642ec7f6ce218a038d27527762d83f8f..bd960e6efb871a2e94d6e33cf8bb7f38eaa5d7af 100644
--- a/sky/examples/raw/painting.sky
+++ b/sky/examples/raw/painting.sky
@@ -18,12 +18,14 @@ void main() {
context.save();
- context.clipRect([0.0, 0.0, context.width, radius]);
+ context.clipRect(new Rect()..setLTRB(0.0, 0.0, context.width, radius));
context.translate(context.width / 2.0, context.height / 2.0);
paint.setARGB(128, 255, 0, 255);
context.rotateDegrees(45.0);
- context.drawRect([-radius, -radius, radius, radius], paint);
+
+ context.drawRect(new Rect()..setLTRB(-radius, -radius, radius, radius),
+ paint);
// Scale x and y by 0.5.
var scaleMatrix = [
« no previous file with comments | « sky/engine/core/painting/Canvas.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698