Skip to content

Instantly share code, notes, and snippets.

@eseidelGoogle
Last active August 29, 2015 14:20
Show Gist options
  • Save eseidelGoogle/56973c1495e1d256c827 to your computer and use it in GitHub Desktop.
Save eseidelGoogle/56973c1495e1d256c827 to your computer and use it in GitHub Desktop.
Painting a full-screen circle
import "dart:sky";
Screen screen = window.screen;
double width = screen.availableWidth;
double height = screen.availableHeight;
PaintingContext ctx = new PaintingContext(width, height);
double radius = min(width, height) * .9;
Paint paint;
paint.setARGB(1, 0, 1, 0);
ctx.drawCircle(width / 2, height / 2, radius, paint);
window.rootDisplayList = ctx;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment