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 |
11 #define SkMatrix_DEFINED | 11 #define SkMatrix_DEFINED |
12 | 12 |
13 #include "SkRect.h" | 13 #include "SkRect.h" |
14 | 14 |
| 15 struct SkRSXform; |
15 class SkString; | 16 class SkString; |
16 | 17 |
17 /** \class SkMatrix | 18 /** \class SkMatrix |
18 | 19 |
19 The SkMatrix class holds a 3x3 matrix for transforming coordinates. | 20 The SkMatrix class holds a 3x3 matrix for transforming coordinates. |
20 SkMatrix does not have a constructor, so it must be explicitly initialized | 21 SkMatrix does not have a constructor, so it must be explicitly initialized |
21 using either reset() - to construct an identity matrix, or one of the set | 22 using either reset() - to construct an identity matrix, or one of the set |
22 functions (e.g. setTranslate, setRotate, etc.). | 23 functions (e.g. setTranslate, setRotate, etc.). |
23 */ | 24 */ |
24 class SK_API SkMatrix { | 25 class SK_API SkMatrix { |
(...skipping 212 matching lines...) Loading... |
237 void setRotate(SkScalar degrees); | 238 void setRotate(SkScalar degrees); |
238 /** Set the matrix to rotate by the specified sine and cosine values, with | 239 /** Set the matrix to rotate by the specified sine and cosine values, with |
239 a pivot point at (px, py). The pivot point is the coordinate that | 240 a pivot point at (px, py). The pivot point is the coordinate that |
240 should remain unchanged by the specified transformation. | 241 should remain unchanged by the specified transformation. |
241 */ | 242 */ |
242 void setSinCos(SkScalar sinValue, SkScalar cosValue, | 243 void setSinCos(SkScalar sinValue, SkScalar cosValue, |
243 SkScalar px, SkScalar py); | 244 SkScalar px, SkScalar py); |
244 /** Set the matrix to rotate by the specified sine and cosine values. | 245 /** Set the matrix to rotate by the specified sine and cosine values. |
245 */ | 246 */ |
246 void setSinCos(SkScalar sinValue, SkScalar cosValue); | 247 void setSinCos(SkScalar sinValue, SkScalar cosValue); |
| 248 |
| 249 SkMatrix& setRSXform(const SkRSXform&); |
| 250 |
247 /** Set the matrix to skew by sx and sy, with a pivot point at (px, py). | 251 /** Set the matrix to skew by sx and sy, with a pivot point at (px, py). |
248 The pivot point is the coordinate that should remain unchanged by the | 252 The pivot point is the coordinate that should remain unchanged by the |
249 specified transformation. | 253 specified transformation. |
250 */ | 254 */ |
251 void setSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py); | 255 void setSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py); |
252 /** Set the matrix to skew by sx and sy. | 256 /** Set the matrix to skew by sx and sy. |
253 */ | 257 */ |
254 void setSkew(SkScalar kx, SkScalar ky); | 258 void setSkew(SkScalar kx, SkScalar ky); |
255 /** Set the matrix to the concatenation of the two specified matrices. | 259 /** Set the matrix to the concatenation of the two specified matrices. |
256 Either of the two matrices may also be the target matrix. | 260 Either of the two matrices may also be the target matrix. |
(...skipping 555 matching lines...) Loading... |
812 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); | 816 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); |
813 | 817 |
814 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int
); | 818 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int
); |
815 | 819 |
816 static const MapPtsProc gMapPtsProcs[]; | 820 static const MapPtsProc gMapPtsProcs[]; |
817 | 821 |
818 friend class SkPerspIter; | 822 friend class SkPerspIter; |
819 }; | 823 }; |
820 | 824 |
821 #endif | 825 #endif |
OLD | NEW |