OLD | NEW |
---|---|
(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 } | |
OLD | NEW |