OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkMatrix44_DEFINED | 8 #ifndef SkMatrix44_DEFINED |
9 #define SkMatrix44_DEFINED | 9 #define SkMatrix44_DEFINED |
10 | 10 |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 * map an array of [x, y, 0, 1] through the matrix, returning an array | 366 * map an array of [x, y, 0, 1] through the matrix, returning an array |
367 * of [x', y', z', w']. | 367 * of [x', y', z', w']. |
368 * | 368 * |
369 * @param src2 array of [x, y] pairs, with implied z=0 and w=1 | 369 * @param src2 array of [x, y] pairs, with implied z=0 and w=1 |
370 * @param count number of [x, y] pairs in src2 | 370 * @param count number of [x, y] pairs in src2 |
371 * @param dst4 array of [x', y', z', w'] quads as the output. | 371 * @param dst4 array of [x', y', z', w'] quads as the output. |
372 */ | 372 */ |
373 void map2(const float src2[], int count, float dst4[]) const; | 373 void map2(const float src2[], int count, float dst4[]) const; |
374 void map2(const double src2[], int count, double dst4[]) const; | 374 void map2(const double src2[], int count, double dst4[]) const; |
375 | 375 |
| 376 bool preserves2dAxisAlignment () const; |
| 377 |
376 void dump() const; | 378 void dump() const; |
377 | 379 |
378 double determinant() const; | 380 double determinant() const; |
379 | 381 |
380 private: | 382 private: |
381 SkMScalar fMat[4][4]; | 383 SkMScalar fMat[4][4]; |
382 mutable unsigned fTypeMask; | 384 mutable unsigned fTypeMask; |
383 | 385 |
384 enum { | 386 enum { |
385 kUnknown_Mask = 0x80, | 387 kUnknown_Mask = 0x80, |
(...skipping 27 matching lines...) Expand all Loading... |
413 /** | 415 /** |
414 * Does not take the time to 'compute' the typemask. Only returns true if | 416 * Does not take the time to 'compute' the typemask. Only returns true if |
415 * we already know that this matrix is identity. | 417 * we already know that this matrix is identity. |
416 */ | 418 */ |
417 inline bool isTriviallyIdentity() const { | 419 inline bool isTriviallyIdentity() const { |
418 return 0 == fTypeMask; | 420 return 0 == fTypeMask; |
419 } | 421 } |
420 }; | 422 }; |
421 | 423 |
422 #endif | 424 #endif |
OLD | NEW |