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

Unified Diff: third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp

Issue 2260393002: add FlipX() and FlipY() funtion in DOMMatrixReadOnly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add FlipX() and FlipY() funtion in DOMMatrixReadOnly. Created 4 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
Index: third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp
diff --git a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp
index d52416b1babe4f8fda10f4860f0b77ac22d8d3b0..2234af56c09b0d7ecd2e76384086b17fef527cf1 100644
--- a/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.cpp
@@ -74,6 +74,26 @@ DOMMatrix* DOMMatrixReadOnly::scaleNonUniform(double sx, double sy, double sz,
return DOMMatrix::create(this)->scaleNonUniformSelf(sx, sy, sz, ox, oy, oz);
}
+DOMMatrix* DOMMatrixReadOnly::flipX()
+{
+ DOMMatrix* filpX = DOMMatrix::create(this);
pdr. 2016/08/20 20:20:02 nit: filpX -> flipX (here, and below)
Hwanseung Lee 2016/08/20 22:40:43 Done.
+ filpX->setM11(-this->m11());
+ filpX->setM12(-this->m12());
+ filpX->setM13(-this->m13());
+ filpX->setM14(-this->m14());
+ return filpX;
+}
+
+DOMMatrix* DOMMatrixReadOnly::flipY()
+{
+ DOMMatrix* filpY = DOMMatrix::create(this);
+ filpY->setM21(-this->m21());
+ filpY->setM22(-this->m22());
+ filpY->setM23(-this->m23());
+ filpY->setM24(-this->m24());
+ return filpY;
+}
+
DOMFloat32Array* DOMMatrixReadOnly::toFloat32Array() const
{
float array[] = {

Powered by Google App Engine
This is Rietveld 408576698