From 9dfbc4eea4ff32ec44c26e8fe820092c3ac2341d Mon Sep 17 00:00:00 2001 From: Matt Perry Date: Tue, 19 May 2015 13:59:05 -0400 Subject: [PATCH] Sky: Add a CustomDart attribute to the IDL compiler, and use that with Canvas to provide a better Dart API. When the attribute is present on an IDL interface, the generate Dart code will be a private interface that can extended by custom dart code. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1135283005 --- examples/raw/painting.sky | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/raw/painting.sky b/examples/raw/painting.sky index 6ff4002c642..bd960e6efb8 100644 --- a/examples/raw/painting.sky +++ b/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 = [