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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 SkScalar getMaxScale() const; | 617 SkScalar getMaxScale() const; |
618 | 618 |
619 /** | 619 /** |
620 * Gets both the min and max scale factors. The min scale factor is scaleFac
tors[0] and the max | 620 * Gets both the min and max scale factors. The min scale factor is scaleFac
tors[0] and the max |
621 * is scaleFactors[1]. If the matrix has perspective false will be returned
and scaleFactors | 621 * is scaleFactors[1]. If the matrix has perspective false will be returned
and scaleFactors |
622 * will be unchanged. | 622 * will be unchanged. |
623 */ | 623 */ |
624 bool getMinMaxScales(SkScalar scaleFactors[2]) const; | 624 bool getMinMaxScales(SkScalar scaleFactors[2]) const; |
625 | 625 |
626 /** | 626 /** |
| 627 * Attempt to decompose this matrix into a scale-only component and whateve
r remains, where |
| 628 * the scale component is to be applied first. |
| 629 * |
| 630 * M -> Remaining * Scale |
| 631 * |
| 632 * On success, return true and assign the scale and remaining components (a
ssuming their |
| 633 * respective parameters are not null). On failure (not invertible) return
false and ignore |
| 634 * the parameters. |
| 635 */ |
| 636 bool decomposeScale(SkSize* scale, SkMatrix* remaining) const; |
| 637 |
| 638 /** |
627 * Return a reference to a const identity matrix | 639 * Return a reference to a const identity matrix |
628 */ | 640 */ |
629 static const SkMatrix& I(); | 641 static const SkMatrix& I(); |
630 | 642 |
631 /** | 643 /** |
632 * Return a reference to a const matrix that is "invalid", one that could | 644 * Return a reference to a const matrix that is "invalid", one that could |
633 * never be used. | 645 * never be used. |
634 */ | 646 */ |
635 static const SkMatrix& InvalidMatrix(); | 647 static const SkMatrix& InvalidMatrix(); |
636 | 648 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], | 783 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], |
772 int count); | 784 int count); |
773 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); | 785 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); |
774 | 786 |
775 static const MapPtsProc gMapPtsProcs[]; | 787 static const MapPtsProc gMapPtsProcs[]; |
776 | 788 |
777 friend class SkPerspIter; | 789 friend class SkPerspIter; |
778 }; | 790 }; |
779 | 791 |
780 #endif | 792 #endif |
OLD | NEW |