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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 173593002: HTML5 Canvas should avoid converting rotation angle to degrees (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 9 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 | « Source/core/html/canvas/CanvasPathMethods.cpp ('k') | Source/platform/graphics/Path.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index 957104bfc191a181dbfdd1af98ee347138d0e7c5..0b4206b8f11510390dffd974ba578404aaa28a1b 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -628,7 +628,7 @@ void CanvasRenderingContext2D::rotate(float angleInRadians)
return;
AffineTransform newTransform = state().m_transform;
- newTransform.rotate(angleInRadians / piDouble * 180.0);
+ newTransform.rotateRadians(angleInRadians);
if (state().m_transform == newTransform)
return;
@@ -641,7 +641,7 @@ void CanvasRenderingContext2D::rotate(float angleInRadians)
modifiableState().m_transform = newTransform;
c->rotate(angleInRadians);
- m_path.transform(AffineTransform().rotate(-angleInRadians / piDouble * 180.0));
+ m_path.transform(AffineTransform().rotateRadians(-angleInRadians));
}
void CanvasRenderingContext2D::translate(float tx, float ty)
« no previous file with comments | « Source/core/html/canvas/CanvasPathMethods.cpp ('k') | Source/platform/graphics/Path.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698