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

Unified Diff: sky/engine/core/painting/Canvas.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/engine/core/painting/Canvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Canvas.h
diff --git a/sky/engine/core/painting/Canvas.h b/sky/engine/core/painting/Canvas.h
index 8cb0b21ba530138306c792e5f647e223f0ca4e04..3775597ef87baf518b21e80e8bcbb72ba73c4b1b 100644
--- a/sky/engine/core/painting/Canvas.h
+++ b/sky/engine/core/painting/Canvas.h
@@ -22,10 +22,25 @@ public:
// Width/Height define a culling rect which Skia may use for optimizing
// out draw calls issued outside the rect.
- double width() const { return m_size.width(); }
- double height() const { return m_size.height(); }
+ float width() const { return m_size.width(); }
+ float height() const { return m_size.height(); }
- void drawCircle(double x, double y, double radius, Paint* paint);
+ void save();
+ void saveLayer(const Vector<float>& bounds, const Paint* paint);
reed1 2015/05/13 21:20:10 The bounds to saveLayer is optional (passing NULL
Matt Perry 2015/05/13 21:22:00 The IDL compiler dictates the interface. But passi
+ void restore();
+
+ void translate(float dx, float dy);
+ void scale(float sx, float sy);
+ void rotateDegrees(float degrees);
+ void skew(float sx, float sy);
+ void concat(const Vector<float>& matrix);
+
+ void clipRect(const Vector<float>& rect);
+
+ void drawPaint(Paint* paint);
reed1 2015/05/13 21:20:10 const for drawPaint
Matt Perry 2015/05/13 21:22:00 Oops, thanks. Will fix in a future CL.
+ void drawRect(const Vector<float>& rect, const Paint* paint);
+ void drawOval(const Vector<float>& rect, const Paint* paint);
+ void drawCircle(float x, float y, float radius, Paint* paint);
reed1 2015/05/13 21:20:11 const for drawCircle
protected:
PassRefPtr<DisplayList> finishRecording();
« no previous file with comments | « no previous file | sky/engine/core/painting/Canvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698