diff options
Diffstat (limited to 'include/utils/SkMatrix44.h')
-rw-r--r-- | include/utils/SkMatrix44.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/utils/SkMatrix44.h b/include/utils/SkMatrix44.h index 6e85bb56f4..9282770588 100644 --- a/include/utils/SkMatrix44.h +++ b/include/utils/SkMatrix44.h @@ -137,6 +137,14 @@ public: return !(other == *this); } + /* When converting from SkMatrix44 to SkMatrix, the third row and + * column is dropped. When converting from SkMatrix to SkMatrix44 + * the third row and column remain as identity: + * [ a b c ] [ a b 0 c ] + * [ d e f ] -> [ d e 0 f ] + * [ g h i ] [ 0 0 1 0 ] + * [ g h 0 i ] + */ SkMatrix44(const SkMatrix&); SkMatrix44& operator=(const SkMatrix& src); operator SkMatrix() const; @@ -259,6 +267,8 @@ public: void setRowMajor(const SkMScalar data[]) { this->setRowMajord(data); } #endif + /* This sets the top-left of the matrix and clears the translation and + * perspective components (with [3][3] set to 1). */ void set3x3(SkMScalar m00, SkMScalar m01, SkMScalar m02, SkMScalar m10, SkMScalar m11, SkMScalar m12, SkMScalar m20, SkMScalar m21, SkMScalar m22); |