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

Side by Side Diff: sky/examples/display_list/full_screen_circle.dart

Issue 1122423009: Make it possible to custom-paint without an Element. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Comment tweak 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 unified diff | Download patch
OLDNEW
(Empty)
1 import "dart:sky";
2 import "dart:math";
3
4 void doIt() {
5 double width = window.innerWidth.toDouble();
6 double height = window.innerHeight.toDouble();
7
8 PictureRecorder recorder = new PictureRecorder(width, height);
9 double radius = min(width, height) * 0.45;
10
11 Paint paint = new Paint()..setARGB(255, 0, 255, 0);
12
13 recorder.drawCircle(width / 2, height / 2, radius, paint);
14
15 document.rootPicture = recorder.endRecording();
16 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698