aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-13 14:46:52 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-13 14:46:52 +0000
commitda9fac0aa13d1445f8b58a75d9390638845c814d (patch)
treed5e7e189d1e5fe3caa0d074e6625a0ca09b9b4d5 /include
parent8260a895869beaa4cab9f8b915e457728f41e561 (diff)
add row/col major getters, plus unit-tests
git-svn-id: http://skia.googlecode.com/svn/trunk@1564 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/utils/SkMatrix44.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/utils/SkMatrix44.h b/include/utils/SkMatrix44.h
index af632d755b..53841fab63 100644
--- a/include/utils/SkMatrix44.h
+++ b/include/utils/SkMatrix44.h
@@ -21,9 +21,6 @@
#include "SkMatrix.h"
#include "SkScalar.h"
-// uncomment this to use doubles for matrix44
-#define SK_MSCALAR_IS_DOUBLE
-
#ifdef SK_MSCALAR_IS_DOUBLE
typedef double SkMScalar;
static inline double SkFloatToMScalar(float x) {
@@ -126,6 +123,11 @@ public:
SkMScalar get(int row, int col) const;
void set(int row, int col, const SkMScalar& value);
+ void asColMajorf(float[]) const;
+ void asColMajord(double[]) const;
+ void asRowMajorf(float[]) const;
+ void asRowMajord(double[]) const;
+
bool isIdentity() const;
void setIdentity();
void reset() { this->setIdentity();}