| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // This extends the Canvas.dart generated from Canvas.idl. | |
| 6 | |
| 7 class Rect { | |
| 8 List<double> _value; | |
| 9 double get left => _value[0]; | |
| 10 double get top => _value[1]; | |
| 11 double get right => _value[2]; | |
| 12 double get bottom => _value[3]; | |
| 13 | |
| 14 void setLTRB(double left, double top, double right, double bottom) { | |
| 15 _value = [left, top, right, bottom]; | |
| 16 } | |
| 17 } | |
| 18 | |
| 19 class Canvas extends _Canvas { | |
| 20 double get height => _height; | |
| 21 double get width => _width; | |
| 22 | |
| 23 void save() => _save(); | |
| 24 void saveLayer(Rect bounds, Paint paint) => | |
| 25 _saveLayer(bounds._value, Paint paint); | |
| 26 void restore() => _restore(); | |
| 27 void translate(double dx, double dy) => _translate(dx, dy); | |
| 28 void scale(double sx, double sy) => _scale(sx, sy); | |
| 29 void rotateDegrees(double degrees) => _rotateDegrees(degrees); | |
| 30 void skew(double sx, double sy) => _skew(sx, sy); | |
| 31 void concat(List<double> matrix9) => _concat(matrix9); | |
| 32 void clipRect(Rect rect) => _clipRect(rect._value); | |
| 33 | |
| 34 void drawPicture(Picture picture) => _drawPicture(picture); | |
| 35 void drawPaint(Paint paint) => _drawPaint(paint); | |
| 36 void drawRect(Rect rect, Paint paint) => _drawRect(rect._value, paint); | |
| 37 void drawOval(Rect rect, Paint paint) => _drawOval(rect._value, paint); | |
| 38 void drawCircle(double x, double y, double radius, Paint paint) => | |
| 39 _drawCircle(x, y, radius, paint); | |
| 40 } | |
| OLD | NEW |