Chromium Code Reviews| Index: include/core/SkMatrix.h |
| diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h |
| index f148e390b5cd4930f2d985f61a286cda3748b7cc..80ef9cb3f6266958bfb421e086efd3407c1e304e 100644 |
| --- a/include/core/SkMatrix.h |
| +++ b/include/core/SkMatrix.h |
| @@ -96,6 +96,16 @@ public: |
| */ |
| bool preservesRightAngles(SkScalar tol = SK_ScalarNearlyZero) const; |
| + /** Decomposes the upper 2x2 of the matrix into a rotation, followed by a non-uniform scale, |
| + followed by another rotation. Returns true if successful. |
| + If the scale factors are uniform, then rotation1 will be 0. |
| + If there is a reflection, yScale will be negative. |
| + Returns false if the matrix is degenerate. |
|
reed1
2013/07/18 14:15:54
... or perspective?
|
| + */ |
| + bool decomposeUpper2x2(SkScalar* rotation0, |
| + SkScalar* xScale, SkScalar* yScale, |
| + SkScalar* rotation1) const; |
| + |
| enum { |
| kMScaleX, |
| kMSkewX, |