OLD | NEW |
| (Empty) |
1 <script> | |
2 import "dart:math"; | |
3 import 'dart:sky'; | |
4 | |
5 void main() { | |
6 double width = window.innerWidth.toDouble(); | |
7 double height = window.innerHeight.toDouble(); | |
8 | |
9 PictureRecorder recorder = new PictureRecorder(width, height); | |
10 double radius = min(width, height) * 0.45; | |
11 | |
12 Paint paint = new Paint()..color = const Color.fromARGB(255, 0, 255, 0); | |
13 | |
14 recorder.drawCircle(width / 2, height / 2, radius, paint); | |
15 | |
16 document.rootPicture = recorder.endRecording(); | |
17 } | |
18 </script> | |
OLD | NEW |