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

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

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/painting/Canvas.h ('k') | sky/engine/core/painting/Canvas.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Canvas.cpp
diff --git a/sky/engine/core/painting/Canvas.cpp b/sky/engine/core/painting/Canvas.cpp
index 00552d94a452a6af88a4fbcf7b756f80d0f9dcfb..c973d69f3c9082d9ca9703411a1179b7f0930f01 100644
--- a/sky/engine/core/painting/Canvas.cpp
+++ b/sky/engine/core/painting/Canvas.cpp
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "math.h"
+
#include "sky/engine/config.h"
#include "sky/engine/core/painting/Canvas.h"
@@ -67,12 +69,12 @@ void Canvas::scale(float sx, float sy)
m_canvas->scale(sx, sy);
}
-void Canvas::rotateDegrees(float degrees)
+void Canvas::rotate(float radians)
{
if (!m_canvas)
return;
ASSERT(m_displayList->isRecording());
- m_canvas->rotate(degrees);
+ m_canvas->rotate(radians * 180.0/M_PI);
}
void Canvas::skew(float sx, float sy)
« no previous file with comments | « sky/engine/core/painting/Canvas.h ('k') | sky/engine/core/painting/Canvas.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698