Chromium Code Reviews| Index: ui/gfx/transform.h |
| diff --git a/ui/gfx/transform.h b/ui/gfx/transform.h |
| index 2be72efd0d7bf91c51409f574ac37f52a9820297..080951996d3ac07286dcd262083c291e2c8811c9 100644 |
| --- a/ui/gfx/transform.h |
| +++ b/ui/gfx/transform.h |
| @@ -78,6 +78,15 @@ class UI_EXPORT Transform { |
| return !(matrix_.getType() & ~SkMatrix44::kTranslate_Mask); |
| } |
| + // Returns true if the matrix is either a positive scale and/or a translation |
|
danakj
2013/01/04 21:17:57
nit: missing a period on the end of the sentence.
|
| + bool IsPositiveScaleOrTranslation() const { |
| + if (!IsScaleOrTranslation()) |
| + return false; |
| + return matrix_.getDouble(0, 0) > 0.0 && |
| + matrix_.getDouble(1, 1) > 0.0 && |
| + matrix_.getDouble(2, 2) > 0.0; |
| + } |
| + |
| // Returns true if the matrix is either identity or pure, non-fractional |
| // translation. |
| bool IsIdentityOrIntegerTranslation() const; |