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

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

Issue 176843016: Add GM that directly tests GrRRectEffect and add inverse fill version of effect. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove empty else Created 6 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 | Annotate | Revision Log
« no previous file with comments | « gm/rrects.cpp ('k') | src/gpu/GrClipMaskManager.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 * 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 * given radius becomes negative, it is pinned to 0. 217 * given radius becomes negative, it is pinned to 0.
218 * 218 *
219 * It is valid for dst == this. 219 * It is valid for dst == this.
220 */ 220 */
221 void outset(SkScalar dx, SkScalar dy, SkRRect* dst) const { 221 void outset(SkScalar dx, SkScalar dy, SkRRect* dst) const {
222 this->inset(-dx, -dy, dst); 222 this->inset(-dx, -dy, dst);
223 } 223 }
224 void outset(SkScalar dx, SkScalar dy) { 224 void outset(SkScalar dx, SkScalar dy) {
225 this->inset(-dx, -dy, this); 225 this->inset(-dx, -dy, this);
226 } 226 }
227
228 /**
229 * Translate the rrect by (dx, dy).
230 */
231 void offset(SkScalar dx, SkScalar dy) {
232 fRect.offset(dx, dy);
233 }
227 234
228 /** 235 /**
229 * Returns true if 'rect' is wholy inside the RR, and both 236 * Returns true if 'rect' is wholy inside the RR, and both
230 * are not empty. 237 * are not empty.
231 */ 238 */
232 bool contains(const SkRect& rect) const; 239 bool contains(const SkRect& rect) const;
233 240
234 SkDEBUGCODE(void validate() const;) 241 SkDEBUGCODE(void validate() const;)
235 242
236 enum { 243 enum {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // uninitialized data 284 // uninitialized data
278 285
279 void computeType() const; 286 void computeType() const;
280 bool checkCornerContainment(SkScalar x, SkScalar y) const; 287 bool checkCornerContainment(SkScalar x, SkScalar y) const;
281 288
282 // to access fRadii directly 289 // to access fRadii directly
283 friend class SkPath; 290 friend class SkPath;
284 }; 291 };
285 292
286 #endif 293 #endif
OLDNEW
« no previous file with comments | « gm/rrects.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698