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