diff options
-rw-r--r-- | include/utils/SkMatrix44.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/utils/SkMatrix44.h b/include/utils/SkMatrix44.h index 553e8d7c4f..90f29a994a 100644 --- a/include/utils/SkMatrix44.h +++ b/include/utils/SkMatrix44.h @@ -225,6 +225,13 @@ public: return !(this->getType() & ~(kScale_Mask | kTranslate_Mask)); } + /** + * Returns true if the matrix only contains scale or is identity. + */ + inline bool isScale() const { + return !(this->getType() & ~kScale_Mask); + } + inline bool hasPerspective() const { return SkToBool(this->getType() & kPerspective_Mask); } |