Index: sky/examples/display_list/full_screen_circle.dart |
diff --git a/sky/examples/display_list/full_screen_circle.dart b/sky/examples/display_list/full_screen_circle.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c1c3e9275ab09231982350f6b8971973ff274ebd |
--- /dev/null |
+++ b/sky/examples/display_list/full_screen_circle.dart |
@@ -0,0 +1,16 @@ |
+import "dart:sky"; |
+import "dart:math"; |
+ |
+void doIt() { |
+ 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(); |
+} |