Add SkMatrix44::setTranspose
It turned out that adding getDouble(...) and setDouble(...) made this change
easier, so I've included that in this cl as well.
Review URL: https://codereview.appspot.com/6845048
git-svn-id: http://skia.googlecode.com/svn/trunk@6424 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/utils/SkMatrix44.h b/include/utils/SkMatrix44.h
index 97faf78..a046a07 100644
--- a/include/utils/SkMatrix44.h
+++ b/include/utils/SkMatrix44.h
@@ -119,6 +119,13 @@
SkMScalar get(int row, int col) const;
void set(int row, int col, const SkMScalar& value);
+ double getDouble(int row, int col) const {
+ return SkMScalarToDouble(this->get(row, col));
+ }
+ void setDouble(int row, int col, double value) {
+ this->set(row, col, SkDoubleToMScalar(value));
+ }
+
void asColMajorf(float[]) const;
void asColMajord(double[]) const;
void asRowMajorf(float[]) const;
@@ -183,6 +190,9 @@
*/
bool invert(SkMatrix44* inverse) const;
+ /** Transpose this matrix in place. */
+ void transpose();
+
/** Apply the matrix to the src vector, returning the new vector in dst.
It is legal for src and dst to point to the same memory.
*/