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

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

Issue 1144483002: Flesh out the Painting API a bit. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
Index: sky/engine/core/painting/PaintingContext.h
diff --git a/sky/engine/core/painting/PaintingContext.h b/sky/engine/core/painting/PaintingContext.h
index 2c082522213f507a79707e6c1bb73e0b4388426c..16a7da547ac908c08c1be91bb6720588add69e1a 100644
--- a/sky/engine/core/painting/PaintingContext.h
+++ b/sky/engine/core/painting/PaintingContext.h
@@ -10,6 +10,7 @@
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
+#include "sky/engine/wtf/Vector.h"
namespace blink {
class Element;
@@ -23,7 +24,23 @@ public:
double height() const { return m_size.height(); }
double width() const { return m_size.width(); }
+ void save();
+ void saveLayer(Vector<float> bounds, Paint* paint);
+ void restore();
+
+ void translate(float dx, float dy);
+ void scale(float sx, float sy);
+ void rotate(float degrees);
+ void skew(float sx, float sy);
+ void concat(Vector<float> matrix);
+
+ void clipRect(Vector<float> rect);
+
+ void drawPaint(Paint* paint);
+ void drawRect(Vector<float> rect, Paint* paint);
+ void drawOval(Vector<float> rect, Paint* paint);
void drawCircle(double x, double y, double radius, Paint* paint);
+
void commit();
private:
« no previous file with comments | « no previous file | sky/engine/core/painting/PaintingContext.cpp » ('j') | sky/engine/core/painting/PaintingContext.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698