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 #ifndef SKY_ENGINE_CORE_PAINTING_CANVAS_H_ | 5 #ifndef SKY_ENGINE_CORE_PAINTING_CANVAS_H_ |
6 #define SKY_ENGINE_CORE_PAINTING_CANVAS_H_ | 6 #define SKY_ENGINE_CORE_PAINTING_CANVAS_H_ |
7 | 7 |
8 #include "sky/engine/core/painting/CanvasPath.h" | 8 #include "sky/engine/core/painting/CanvasPath.h" |
9 #include "sky/engine/core/painting/Paint.h" | 9 #include "sky/engine/core/painting/Paint.h" |
10 #include "sky/engine/core/painting/Picture.h" | 10 #include "sky/engine/core/painting/Picture.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // out draw calls issued outside the rect. | 30 // out draw calls issued outside the rect. |
31 float width() const { return m_size.width(); } | 31 float width() const { return m_size.width(); } |
32 float height() const { return m_size.height(); } | 32 float height() const { return m_size.height(); } |
33 | 33 |
34 void save(); | 34 void save(); |
35 void saveLayer(const Rect& bounds, const Paint* paint); | 35 void saveLayer(const Rect& bounds, const Paint* paint); |
36 void restore(); | 36 void restore(); |
37 | 37 |
38 void translate(float dx, float dy); | 38 void translate(float dx, float dy); |
39 void scale(float sx, float sy); | 39 void scale(float sx, float sy); |
40 void rotateDegrees(float degrees); | 40 void rotate(float radians); |
41 void skew(float sx, float sy); | 41 void skew(float sx, float sy); |
42 void concat(const Float32List& matrix4); | 42 void concat(const Float32List& matrix4); |
43 | 43 |
44 void clipRect(const Rect& rect); | 44 void clipRect(const Rect& rect); |
45 | 45 |
46 void drawLine(float x0, float y0, float x1, float y1, const Paint* paint); | 46 void drawLine(float x0, float y0, float x1, float y1, const Paint* paint); |
47 void drawPicture(Picture* picture); | 47 void drawPicture(Picture* picture); |
48 void drawPaint(const Paint* paint); | 48 void drawPaint(const Paint* paint); |
49 void drawRect(const Rect& rect, const Paint* paint); | 49 void drawRect(const Rect& rect, const Paint* paint); |
50 void drawRRect(const RRect* rrect, const Paint* paint); | 50 void drawRRect(const RRect* rrect, const Paint* paint); |
(...skipping 14 matching lines...) Expand all Loading... |
65 | 65 |
66 private: | 66 private: |
67 FloatSize m_size; | 67 FloatSize m_size; |
68 RefPtr<DisplayList> m_displayList; | 68 RefPtr<DisplayList> m_displayList; |
69 SkCanvas* m_canvas; | 69 SkCanvas* m_canvas; |
70 }; | 70 }; |
71 | 71 |
72 } // namespace blink | 72 } // namespace blink |
73 | 73 |
74 #endif // SKY_ENGINE_CORE_PAINTING_CANVAS_H_ | 74 #endif // SKY_ENGINE_CORE_PAINTING_CANVAS_H_ |
OLD | NEW |