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

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

Issue 24233004: Support currentTransform in 2D Canvas. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase to upstream Created 7 years, 2 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: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index 4bc56b201c406dea598180b30114f4f276b1512c..dc6a715568c025621e8982e815ee922366330fca 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -596,6 +596,11 @@ void CanvasRenderingContext2D::setGlobalCompositeOperation(const String& operati
c->setCompositeOperation(op, blendMode);
}
+void CanvasRenderingContext2D::setCurrentTransform(const SVGMatrix& matrix)
+{
+ setTransform(matrix.a(), matrix.b(), matrix.c(), matrix.d(), matrix.e(), matrix.f());
+}
+
void CanvasRenderingContext2D::scale(float sx, float sy)
{
GraphicsContext* c = drawingContext();
@@ -698,12 +703,12 @@ void CanvasRenderingContext2D::transform(float m11, float m12, float m21, float
realizeSaves();
+ modifiableState().m_transform = newTransform;
Justin Novosad 2013/10/09 17:17:04 Interesting bug you fixed here, but is this the ri
dshwang 2013/10/09 17:48:20 exactly. This change is only for currentTransform
if (!newTransform.isInvertible()) {
modifiableState().m_invertibleCTM = false;
return;
}
- modifiableState().m_transform = newTransform;
c->concatCTM(transform);
m_path.transform(transform.inverse());
}
« no previous file with comments | « Source/core/html/canvas/CanvasRenderingContext2D.h ('k') | Source/core/html/canvas/CanvasRenderingContext2D.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698