Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: sky/engine/core/painting/Canvas.idl

Issue 1144483002: Flesh out the Painting API a bit. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: constify Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
5 // TODO(mpcomplete): Figure out a better SkMatrix/SkRect representation.
4 interface Canvas { 6 interface Canvas {
5 // Height and width are used for culling optimizations and do not necessarily 7 // Height and width are used for culling optimizations and do not necessarily
6 // imply that the Canvas is backed by a buffer with any specific bounds. 8 // imply that the Canvas is backed by a buffer with any specific bounds.
7 readonly attribute double height; 9 readonly attribute float height;
8 readonly attribute double width; 10 readonly attribute float width;
9 11
10 void drawCircle(double x, double y, double radius, Paint paint); 12 void save();
13 void saveLayer(float[] bounds4 /* optional */, Paint paint /* optional */);
14 void restore();
15
16 void translate(float dx, float dy);
17 void scale(float sx, float sy);
18 void rotateDegrees(float degrees);
19 void skew(float sx, float sy);
20 void concat(float[] matrix9);
21
22 void clipRect(float[] rect4);
23
24 void drawPaint(Paint paint);
25 void drawRect(float[] rect4, Paint paint);
26 void drawOval(float[] rect4, Paint paint);
27 void drawCircle(float x, float y, float radius, Paint paint);
11 }; 28 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698