Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(725)

Side by Side Diff: include/core/SkMatrix.h

Issue 1022003003: Revert of add SkMatrix::decomposeScale (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkBitmapProcState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 return false and ignore the parameters.
634 *
635 * Possible reasons to fail: perspective, one or more scale factors are zer o.
636 */
637 bool decomposeScale(SkSize* scale, SkMatrix* remaining = NULL) const;
638
639 /**
640 * Return a reference to a const identity matrix 627 * Return a reference to a const identity matrix
641 */ 628 */
642 static const SkMatrix& I(); 629 static const SkMatrix& I();
643 630
644 /** 631 /**
645 * Return a reference to a const matrix that is "invalid", one that could 632 * Return a reference to a const matrix that is "invalid", one that could
646 * never be used. 633 * never be used.
647 */ 634 */
648 static const SkMatrix& InvalidMatrix(); 635 static const SkMatrix& InvalidMatrix();
649 636
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], 771 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[],
785 int count); 772 int count);
786 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); 773 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int);
787 774
788 static const MapPtsProc gMapPtsProcs[]; 775 static const MapPtsProc gMapPtsProcs[];
789 776
790 friend class SkPerspIter; 777 friend class SkPerspIter;
791 }; 778 };
792 779
793 #endif 780 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBitmapProcState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698