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

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

Issue 1793373002: Add asRRect method to SkClipStack::Element (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comments Created 4 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
« no previous file with comments | « no previous file | src/core/SkClipStack.cpp » ('j') | src/core/SkClipStack.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 #ifndef SkClipStack_DEFINED 8 #ifndef SkClipStack_DEFINED
9 #define SkClipStack_DEFINED 9 #define SkClipStack_DEFINED
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 SkASSERT(kRect_Type == fType && (fRRect.isRect() || fRRect.isEmpty() )); 91 SkASSERT(kRect_Type == fType && (fRRect.isRect() || fRRect.isEmpty() ));
92 return fRRect.getBounds(); 92 return fRRect.getBounds();
93 } 93 }
94 94
95 //!< Call if getType() is not kEmpty to get the set operation used to co mbine this element. 95 //!< Call if getType() is not kEmpty to get the set operation used to co mbine this element.
96 SkRegion::Op getOp() const { return fOp; } 96 SkRegion::Op getOp() const { return fOp; }
97 97
98 //!< Call to get the element as a path, regardless of its type. 98 //!< Call to get the element as a path, regardless of its type.
99 void asPath(SkPath* path) const; 99 void asPath(SkPath* path) const;
100 100
101 //!< Call if getType() is not kPath to get the element as a round rect.
102 const SkRRect& asRRect() const { SkASSERT(kPath_Type != fType); return f RRect; }
103
101 /** If getType() is not kEmpty this indicates whether the clip shape sho uld be anti-aliased 104 /** If getType() is not kEmpty this indicates whether the clip shape sho uld be anti-aliased
102 when it is rasterized. */ 105 when it is rasterized. */
103 bool isAA() const { return fDoAA; } 106 bool isAA() const { return fDoAA; }
104 107
105 //!< Inverts the fill of the clip shape. Note that a kEmpty element rema ins kEmpty. 108 //!< Inverts the fill of the clip shape. Note that a kEmpty element rema ins kEmpty.
106 void invertShapeFillType(); 109 void invertShapeFillType();
107 110
108 //!< Sets the set operation represented by the element. 111 //!< Sets the set operation represented by the element.
109 void setOp(SkRegion::Op op) { fOp = op; } 112 void setOp(SkRegion::Op op) { fOp = op; }
110 113
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 */ 471 */
469 void restoreTo(int saveCount); 472 void restoreTo(int saveCount);
470 473
471 /** 474 /**
472 * Return the next unique generation ID. 475 * Return the next unique generation ID.
473 */ 476 */
474 static int32_t GetNextGenID(); 477 static int32_t GetNextGenID();
475 }; 478 };
476 479
477 #endif 480 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkClipStack.cpp » ('j') | src/core/SkClipStack.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698