| 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 kAffine_Mask | | 718 kAffine_Mask | |
| 719 kPerspective_Mask | | 719 kPerspective_Mask | |
| 720 kRectStaysRect_Mask | 720 kRectStaysRect_Mask |
| 721 }; | 721 }; |
| 722 | 722 |
| 723 SkScalar fMat[9]; | 723 SkScalar fMat[9]; |
| 724 mutable uint32_t fTypeMask; | 724 mutable uint32_t fTypeMask; |
| 725 | 725 |
| 726 /** Are all elements of the matrix finite? | 726 /** Are all elements of the matrix finite? |
| 727 */ | 727 */ |
| 728 bool isFinite() const; | 728 bool isFinite() const { return SkScalarsAreFinite(fMat, 9); } |
| 729 | 729 |
| 730 static void ComputeInv(SkScalar dst[9], const SkScalar src[9], double invDet
, bool isPersp); | 730 static void ComputeInv(SkScalar dst[9], const SkScalar src[9], double invDet
, bool isPersp); |
| 731 | 731 |
| 732 void setScaleTranslate(SkScalar sx, SkScalar sy, SkScalar tx, SkScalar ty) { | 732 void setScaleTranslate(SkScalar sx, SkScalar sy, SkScalar tx, SkScalar ty) { |
| 733 fMat[kMScaleX] = sx; | 733 fMat[kMScaleX] = sx; |
| 734 fMat[kMSkewX] = 0; | 734 fMat[kMSkewX] = 0; |
| 735 fMat[kMTransX] = tx; | 735 fMat[kMTransX] = tx; |
| 736 | 736 |
| 737 fMat[kMSkewY] = 0; | 737 fMat[kMSkewY] = 0; |
| 738 fMat[kMScaleY] = sy; | 738 fMat[kMScaleY] = sy; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); | 816 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); |
| 817 | 817 |
| 818 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int
); | 818 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int
); |
| 819 | 819 |
| 820 static const MapPtsProc gMapPtsProcs[]; | 820 static const MapPtsProc gMapPtsProcs[]; |
| 821 | 821 |
| 822 friend class SkPerspIter; | 822 friend class SkPerspIter; |
| 823 }; | 823 }; |
| 824 | 824 |
| 825 #endif | 825 #endif |
| OLD | NEW |