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

Unified Diff: Source/core/dom/DOMMatrix.cpp

Issue 485523002: Implement *multiply*() methods in DOMMatrix. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: pdr's comment Created 6 years, 4 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/dom/DOMMatrix.h ('k') | Source/core/dom/DOMMatrix.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DOMMatrix.cpp
diff --git a/Source/core/dom/DOMMatrix.cpp b/Source/core/dom/DOMMatrix.cpp
index 75cefcb63fe9bf945653424bb609bba356e300b0..22a9df9770576e61f14d7bf6247da6f41821f074 100644
--- a/Source/core/dom/DOMMatrix.cpp
+++ b/Source/core/dom/DOMMatrix.cpp
@@ -29,6 +29,26 @@ void DOMMatrix::setIs2D(bool value)
m_is2D = value;
}
+DOMMatrix* DOMMatrix::multiplySelf(DOMMatrix* other)
+{
+ if (!other->is2D())
+ m_is2D = false;
+
+ m_matrix = m_matrix * other->matrix();
+
+ return this;
+}
+
+DOMMatrix* DOMMatrix::preMultiplySelf(DOMMatrix* other)
+{
+ if (!other->is2D())
+ m_is2D = false;
+
+ m_matrix = other->matrix() * m_matrix;
+
+ return this;
+}
+
DOMMatrix* DOMMatrix::translateSelf(double tx, double ty, double tz)
{
if (!tx && !ty && !tz)
« no previous file with comments | « Source/core/dom/DOMMatrix.h ('k') | Source/core/dom/DOMMatrix.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698