diff options
Diffstat (limited to 'include/core/SkMatrix.h')
-rw-r--r-- | include/core/SkMatrix.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h index a272051067..b2ee3c61bf 100644 --- a/include/core/SkMatrix.h +++ b/include/core/SkMatrix.h @@ -624,6 +624,19 @@ public: bool getMinMaxScales(SkScalar scaleFactors[2]) const; /** + * Attempt to decompose this matrix into a scale-only component and whatever remains, where + * the scale component is to be applied first. + * + * M -> Remaining * Scale + * + * On success, return true and assign the scale and remaining components (assuming their + * respective parameters are not null). On failure return false and ignore the parameters. + * + * Possible reasons to fail: perspective, one or more scale factors are zero. + */ + bool decomposeScale(SkSize* scale, SkMatrix* remaining = NULL) const; + + /** * Return a reference to a const identity matrix */ static const SkMatrix& I(); |