OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // TODO(mpcomplete): Figure out a better SkMatrix/SkRect representation. | |
5 interface PaintingContext { | 6 interface PaintingContext { |
6 readonly attribute double height; | 7 readonly attribute double height; |
7 readonly attribute double width; | 8 readonly attribute double width; |
8 | 9 |
10 void save(); | |
11 void saveLayer(float[] bounds4 /* optional */, Paint paint /* optional */); | |
12 void restore(); | |
13 | |
14 void translate(float dx, float dy); | |
15 void scale(float sx, float sy); | |
robertphillips
2015/05/13 20:22:06
rotateDegrees ? to leave room for a rotateRadians
Matt Perry
2015/05/13 20:32:44
Done.
| |
16 void rotate(float degrees); | |
17 void skew(float sx, float sy); | |
18 void concat(float[] matrix9); | |
19 | |
20 void clipRect(float[] rect4); | |
21 | |
22 void drawPaint(Paint paint); | |
23 void drawRect(float[] rect4, Paint paint); | |
24 void drawOval(float[] rect4, Paint paint); | |
robertphillips
2015/05/13 20:22:06
What about something like: drawRoundRectXY(float[]
Matt Perry
2015/05/13 20:32:44
Sure. I didn't add all the methods from skia right
| |
25 // TODO(mpcomplete): SkScalar is a float. Do we really want doubles? | |
9 void drawCircle(double x, double y, double radius, Paint paint); | 26 void drawCircle(double x, double y, double radius, Paint paint); |
reed1
2015/05/13 20:35:03
FWIW : SkScalar is currently float, but we are bui
| |
27 | |
10 void commit(); | 28 void commit(); |
11 }; | 29 }; |
OLD | NEW |