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

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

Issue 171413004: Analytic rrect clip for cicular corners, radius >= .5 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix windows warning in rrects.cpp Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrTBackendEffectFactory.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 SkRRect_DEFINED 8 #ifndef SkRRect_DEFINED
9 #define SkRRect_DEFINED 9 #define SkRRect_DEFINED
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 SkASSERT(kUnknown_Type != fType); 89 SkASSERT(kUnknown_Type != fType);
90 return fType; 90 return fType;
91 } 91 }
92 92
93 Type type() const { return this->getType(); } 93 Type type() const { return this->getType(); }
94 94
95 inline bool isEmpty() const { return kEmpty_Type == this->getType(); } 95 inline bool isEmpty() const { return kEmpty_Type == this->getType(); }
96 inline bool isRect() const { return kRect_Type == this->getType(); } 96 inline bool isRect() const { return kRect_Type == this->getType(); }
97 inline bool isOval() const { return kOval_Type == this->getType(); } 97 inline bool isOval() const { return kOval_Type == this->getType(); }
98 inline bool isSimple() const { return kSimple_Type == this->getType(); } 98 inline bool isSimple() const { return kSimple_Type == this->getType(); }
99 inline bool isSimpleCircular() const {
100 return this->isSimple() && fRadii[0].fX == fRadii[0].fY;
101 }
99 inline bool isComplex() const { return kComplex_Type == this->getType(); } 102 inline bool isComplex() const { return kComplex_Type == this->getType(); }
100 103
101 SkScalar width() const { return fRect.width(); } 104 SkScalar width() const { return fRect.width(); }
102 SkScalar height() const { return fRect.height(); } 105 SkScalar height() const { return fRect.height(); }
103 106
104 /** 107 /**
105 * Set this RR to the empty rectangle (0,0,0,0) with 0 x & y radii. 108 * Set this RR to the empty rectangle (0,0,0,0) with 0 x & y radii.
106 */ 109 */
107 void setEmpty() { 110 void setEmpty() {
108 fRect.setEmpty(); 111 fRect.setEmpty();
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // uninitialized data 277 // uninitialized data
275 278
276 void computeType() const; 279 void computeType() const;
277 bool checkCornerContainment(SkScalar x, SkScalar y) const; 280 bool checkCornerContainment(SkScalar x, SkScalar y) const;
278 281
279 // to access fRadii directly 282 // to access fRadii directly
280 friend class SkPath; 283 friend class SkPath;
281 }; 284 };
282 285
283 #endif 286 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrTBackendEffectFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698