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

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

Issue 1164393002: Convert everything in the Sky API from degrees to radians. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | sky/engine/core/painting/Canvas.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
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
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_
OLDNEW
« 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