<script> | |
import "dart:math"; | |
import 'dart:sky'; | |
void main() { | |
double width = window.innerWidth.toDouble(); | |
double height = window.innerHeight.toDouble(); | |
PictureRecorder recorder = new PictureRecorder(width, height); | |
double radius = min(width, height) * 0.45; | |
Paint paint = new Paint()..setARGB(255, 0, 255, 0); | |
recorder.drawCircle(width / 2, height / 2, radius, paint); | |
document.rootPicture = recorder.endRecording(); | |
} | |
</script> |