Chromium Code Reviews| Index: sky/engine/core/painting/PaintingContext.idl |
| diff --git a/sky/engine/core/painting/PaintingContext.idl b/sky/engine/core/painting/PaintingContext.idl |
| index 8eec203b5b9fbde6570dc4004f7244c640b03275..f7c8884668ae8df2439fb515f5cf93080cd361a3 100644 |
| --- a/sky/engine/core/painting/PaintingContext.idl |
| +++ b/sky/engine/core/painting/PaintingContext.idl |
| @@ -2,10 +2,28 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +// TODO(mpcomplete): Figure out a better SkMatrix/SkRect representation. |
| interface PaintingContext { |
| readonly attribute double height; |
| readonly attribute double width; |
| + void save(); |
| + void saveLayer(float[] bounds4 /* optional */, Paint paint /* optional */); |
| + void restore(); |
| + |
| + void translate(float dx, float dy); |
| + 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.
|
| + void rotate(float degrees); |
| + void skew(float sx, float sy); |
| + void concat(float[] matrix9); |
| + |
| + void clipRect(float[] rect4); |
| + |
| + void drawPaint(Paint paint); |
| + void drawRect(float[] rect4, Paint paint); |
| + 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
|
| + // TODO(mpcomplete): SkScalar is a float. Do we really want doubles? |
| 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
|
| + |
| void commit(); |
| }; |