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

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

Issue 1508003008: Split big rrect aa effect up into separate images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix int->scalar warnings Created 5 years 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 | « gm/bigrrectaaeffect.cpp ('k') | no next file » | 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 rr.setRect(r); 146 rr.setRect(r);
147 return rr; 147 return rr;
148 } 148 }
149 149
150 static SkRRect MakeOval(const SkRect& oval) { 150 static SkRRect MakeOval(const SkRect& oval) {
151 SkRRect rr; 151 SkRRect rr;
152 rr.setOval(oval); 152 rr.setOval(oval);
153 return rr; 153 return rr;
154 } 154 }
155 155
156 static SkRRect MakeRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad) {
157 SkRRect rr;
158 rr.setRectXY(rect, xRad, yRad);
159 return rr;
160 }
161
156 /** 162 /**
157 * Set this RR to match the supplied oval. All x radii will equal half the 163 * Set this RR to match the supplied oval. All x radii will equal half the
158 * width and all y radii will equal half the height. 164 * width and all y radii will equal half the height.
159 */ 165 */
160 void setOval(const SkRect& oval) { 166 void setOval(const SkRect& oval) {
161 fRect = oval; 167 fRect = oval;
162 fRect.sort(); 168 fRect.sort();
163 169
164 if (fRect.isEmpty()) { 170 if (fRect.isEmpty()) {
165 this->setEmpty(); 171 this->setEmpty();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // uninitialized data 325 // uninitialized data
320 326
321 void computeType(); 327 void computeType();
322 bool checkCornerContainment(SkScalar x, SkScalar y) const; 328 bool checkCornerContainment(SkScalar x, SkScalar y) const;
323 329
324 // to access fRadii directly 330 // to access fRadii directly
325 friend class SkPath; 331 friend class SkPath;
326 }; 332 };
327 333
328 #endif 334 #endif
OLDNEW
« no previous file with comments | « gm/bigrrectaaeffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698