Commit 36baaf53 authored by Matt Perry's avatar Matt Perry

Sky: Add a Point class.

Also, fix the style in Rect.cpp/.h.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1158843002
parent b1b94b47
......@@ -14,13 +14,14 @@ void main() {
var element = document.getElementById('canvas');
element.requestPaint((PaintingContext context) {
Paint paint = new Paint();
double radius = math.min(context.width, context.height) / 2.0;
Point mid = new Point(context.width / 2.0, context.height / 2.0);
double radius = math.min(mid.x, mid.y);
context.save();
context.clipRect(new Rect()..setLTRB(0.0, 0.0, context.width, radius));
context.translate(context.width / 2.0, context.height / 2.0);
context.translate(mid.x, mid.y);
paint.setARGB(128, 255, 0, 255);
context.rotateDegrees(45.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment