| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkMatrix_DEFINED | 10 #ifndef SkMatrix_DEFINED |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 bool isIdentity() const { | 73 bool isIdentity() const { |
| 74 return this->getType() == 0; | 74 return this->getType() == 0; |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool isScaleTranslate() const { | 77 bool isScaleTranslate() const { |
| 78 return !(this->getType() & ~(kScale_Mask | kTranslate_Mask)); | 78 return !(this->getType() & ~(kScale_Mask | kTranslate_Mask)); |
| 79 } | 79 } |
| 80 | 80 |
| 81 /** Returns true if will map a rectangle to another rectangle. This can be | 81 /** Returns true if will map a rectangle to another rectangle. This can be |
| 82 true if the matrix is identity, scale-only, or rotates a multiple of | 82 true if the matrix is identity, scale-only, or rotates a multiple of |
| 83 90 degrees. | 83 90 degrees, or mirrors in x or y. |
| 84 */ | 84 */ |
| 85 bool rectStaysRect() const { | 85 bool rectStaysRect() const { |
| 86 if (fTypeMask & kUnknown_Mask) { | 86 if (fTypeMask & kUnknown_Mask) { |
| 87 fTypeMask = this->computeTypeMask(); | 87 fTypeMask = this->computeTypeMask(); |
| 88 } | 88 } |
| 89 return (fTypeMask & kRectStaysRect_Mask) != 0; | 89 return (fTypeMask & kRectStaysRect_Mask) != 0; |
| 90 } | 90 } |
| 91 // alias for rectStaysRect() | 91 // alias for rectStaysRect() |
| 92 bool preservesAxisAlignment() const { return this->rectStaysRect(); } | 92 bool preservesAxisAlignment() const { return this->rectStaysRect(); } |
| 93 | 93 |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 | 830 |
| 831 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int
); | 831 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int
); |
| 832 | 832 |
| 833 static const MapPtsProc gMapPtsProcs[]; | 833 static const MapPtsProc gMapPtsProcs[]; |
| 834 | 834 |
| 835 friend class SkPerspIter; | 835 friend class SkPerspIter; |
| 836 }; | 836 }; |
| 837 SK_END_REQUIRE_DENSE | 837 SK_END_REQUIRE_DENSE |
| 838 | 838 |
| 839 #endif | 839 #endif |
| OLD | NEW |