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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 bool preservesAxisAlignment() const { return this->rectStaysRect(); } | 74 bool preservesAxisAlignment() const { return this->rectStaysRect(); } |
75 | 75 |
76 /** | 76 /** |
77 * Returns true if the matrix contains perspective elements. | 77 * Returns true if the matrix contains perspective elements. |
78 */ | 78 */ |
79 bool hasPerspective() const { | 79 bool hasPerspective() const { |
80 return SkToBool(this->getPerspectiveTypeMaskOnly() & | 80 return SkToBool(this->getPerspectiveTypeMaskOnly() & |
81 kPerspective_Mask); | 81 kPerspective_Mask); |
82 } | 82 } |
83 | 83 |
84 /** Returns true if the matrix contains only translation, rotation or unifor
m scale | 84 /** Returns true if the matrix contains only translation, rotation/reflectio
n or uniform scale |
85 Returns false if other transformation types are included or is degenerat
e | 85 Returns false if other transformation types are included or is degenerat
e |
86 */ | 86 */ |
87 bool isSimilarity(SkScalar tol = SK_ScalarNearlyZero) const; | 87 bool isSimilarity(SkScalar tol = SK_ScalarNearlyZero) const; |
88 | 88 |
89 /** Returns true if the matrix contains only translation, rotation or scale | 89 /** Returns true if the matrix contains only translation, rotation/reflectio
n or scale |
90 (non-uniform scale is allowed). | 90 (non-uniform scale is allowed). |
91 Returns false if other transformation types are included or is degenerat
e | 91 Returns false if other transformation types are included or is degenerat
e |
92 */ | 92 */ |
93 bool preservesRightAngles(SkScalar tol = SK_ScalarNearlyZero) const; | 93 bool preservesRightAngles(SkScalar tol = SK_ScalarNearlyZero) const; |
94 | 94 |
95 enum { | 95 enum { |
96 kMScaleX, | 96 kMScaleX, |
97 kMSkewX, | 97 kMSkewX, |
98 kMTransX, | 98 kMTransX, |
99 kMSkewY, | 99 kMSkewY, |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], | 711 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], |
712 int count); | 712 int count); |
713 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); | 713 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); |
714 | 714 |
715 static const MapPtsProc gMapPtsProcs[]; | 715 static const MapPtsProc gMapPtsProcs[]; |
716 | 716 |
717 friend class SkPerspIter; | 717 friend class SkPerspIter; |
718 }; | 718 }; |
719 | 719 |
720 #endif | 720 #endif |
OLD | NEW |