aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/utils
diff options
context:
space:
mode:
authorGravatar vollick@chromium.org <vollick@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-14 21:33:55 +0000
committerGravatar vollick@chromium.org <vollick@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-14 21:33:55 +0000
commit9b21c25e742d6a8b69bee8b049e79877f93b5936 (patch)
tree2bf4ad739aa9646c60bba74ff6e880b5d60add42 /include/utils
parent57cff8dbdfb32b3fea426519a4fdc05f13be69d9 (diff)
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
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/SkMatrix44.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/utils/SkMatrix44.h b/include/utils/SkMatrix44.h
index 97faf783f4..a046a079df 100644
--- a/include/utils/SkMatrix44.h
+++ b/include/utils/SkMatrix44.h
@@ -119,6 +119,13 @@ public:
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 @@ public:
*/
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.
*/