OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |