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

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

Issue 2012233002: Make SkPath::isOval() and SkPath::isRRect return the orientation and starting index. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: record mod'ed start indices Created 4 years, 6 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 | include/core/SkPath.h » ('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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 bool isIdentity() const { 73 bool isIdentity() const {
74 return this->getType() == 0; 74 return this->getType() == 0;
75 } 75 }
76 76
77 bool isScaleTranslate() const { 77 bool isScaleTranslate() const {
78 return !(this->getType() & ~(kScale_Mask | kTranslate_Mask)); 78 return !(this->getType() & ~(kScale_Mask | kTranslate_Mask));
79 } 79 }
80 80
81 /** Returns true if will map a rectangle to another rectangle. This can be 81 /** Returns true if will map a rectangle to another rectangle. This can be
82 true if the matrix is identity, scale-only, or rotates a multiple of 82 true if the matrix is identity, scale-only, or rotates a multiple of
83 90 degrees. 83 90 degrees, or mirrors in x or y.
84 */ 84 */
85 bool rectStaysRect() const { 85 bool rectStaysRect() const {
86 if (fTypeMask & kUnknown_Mask) { 86 if (fTypeMask & kUnknown_Mask) {
87 fTypeMask = this->computeTypeMask(); 87 fTypeMask = this->computeTypeMask();
88 } 88 }
89 return (fTypeMask & kRectStaysRect_Mask) != 0; 89 return (fTypeMask & kRectStaysRect_Mask) != 0;
90 } 90 }
91 // alias for rectStaysRect() 91 // alias for rectStaysRect()
92 bool preservesAxisAlignment() const { return this->rectStaysRect(); } 92 bool preservesAxisAlignment() const { return this->rectStaysRect(); }
93 93
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 830
831 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int ); 831 static void Affine_vpts(const SkMatrix&, SkPoint dst[], const SkPoint[], int );
832 832
833 static const MapPtsProc gMapPtsProcs[]; 833 static const MapPtsProc gMapPtsProcs[];
834 834
835 friend class SkPerspIter; 835 friend class SkPerspIter;
836 }; 836 };
837 SK_END_REQUIRE_DENSE 837 SK_END_REQUIRE_DENSE
838 838
839 #endif 839 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698