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

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

Issue 2042813002: Make GrShape track the winding direction and starting point for rrect types. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fix more MSVS warnings 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 | src/gpu/GrShape.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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 this->setEmpty(); 134 this->setEmpty();
135 return; 135 return;
136 } 136 }
137 137
138 memset(fRadii, 0, sizeof(fRadii)); 138 memset(fRadii, 0, sizeof(fRadii));
139 fType = kRect_Type; 139 fType = kRect_Type;
140 140
141 SkDEBUGCODE(this->validate();) 141 SkDEBUGCODE(this->validate();)
142 } 142 }
143 143
144 static SkRRect MakeEmpty() {
145 SkRRect rr;
146 rr.setEmpty();
147 return rr;
148 }
149
144 static SkRRect MakeRect(const SkRect& r) { 150 static SkRRect MakeRect(const SkRect& r) {
145 SkRRect rr; 151 SkRRect rr;
146 rr.setRect(r); 152 rr.setRect(r);
147 return rr; 153 return rr;
148 } 154 }
149 155
150 static SkRRect MakeOval(const SkRect& oval) { 156 static SkRRect MakeOval(const SkRect& oval) {
151 SkRRect rr; 157 SkRRect rr;
152 rr.setOval(oval); 158 rr.setOval(oval);
153 return rr; 159 return rr;
154 } 160 }
155 161
156 static SkRRect MakeRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad) { 162 static SkRRect MakeRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad) {
157 SkRRect rr; 163 SkRRect rr;
158 rr.setRectXY(rect, xRad, yRad); 164 rr.setRectXY(rect, xRad, yRad);
159 return rr; 165 return rr;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 332
327 void computeType(); 333 void computeType();
328 bool checkCornerContainment(SkScalar x, SkScalar y) const; 334 bool checkCornerContainment(SkScalar x, SkScalar y) const;
329 void scaleRadii(); 335 void scaleRadii();
330 336
331 // to access fRadii directly 337 // to access fRadii directly
332 friend class SkPath; 338 friend class SkPath;
333 }; 339 };
334 340
335 #endif 341 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrShape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698