Index: sky/examples/raw/hello_world.dart |
diff --git a/sky/examples/raw/hello_world.dart b/sky/examples/raw/hello_world.dart |
index 4264abf8990f0bee5c78ce2d5bad6f70456e9ee3..8b77e90a674e7e240a251cb43d890b82169a6bcc 100644 |
--- a/sky/examples/raw/hello_world.dart |
+++ b/sky/examples/raw/hello_world.dart |
@@ -9,11 +9,12 @@ Picture draw(int a, int r, int g, int b) { |
double width = view.width; |
double height = view.height; |
- PictureRecorder recorder = new PictureRecorder(width, height); |
+ PictureRecorder recorder = new PictureRecorder(); |
+ Canvas canvas = recorder.beginRecording(width, height); |
double radius = min(width, height) * 0.45; |
Paint paint = new Paint()..color = new Color.fromARGB(a, r, g, b); |
- recorder.drawCircle(width / 2, height / 2, radius, paint); |
+ canvas.drawCircle(width / 2, height / 2, radius, paint); |
return recorder.endRecording(); |
} |