OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 SkCanvas_DEFINED | 8 #ifndef SkCanvas_DEFINED |
9 #define SkCanvas_DEFINED | 9 #define SkCanvas_DEFINED |
10 | 10 |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 | 1122 |
1123 /** Return the clip stack. The clip stack stores all the individual | 1123 /** Return the clip stack. The clip stack stores all the individual |
1124 * clips organized by the save/restore frame in which they were | 1124 * clips organized by the save/restore frame in which they were |
1125 * added. | 1125 * added. |
1126 * @return the current clip stack ("list" of individual clip elements) | 1126 * @return the current clip stack ("list" of individual clip elements) |
1127 */ | 1127 */ |
1128 const SkClipStack* getClipStack() const { | 1128 const SkClipStack* getClipStack() const { |
1129 return &fClipStack; | 1129 return &fClipStack; |
1130 } | 1130 } |
1131 | 1131 |
| 1132 /** |
| 1133 * Gets a current clip path from the clip stack. |
| 1134 */ |
| 1135 void getCurrentClipPath(SkPath*) const; |
| 1136 |
1132 typedef SkCanvasClipVisitor ClipVisitor; | 1137 typedef SkCanvasClipVisitor ClipVisitor; |
1133 /** | 1138 /** |
1134 * Replays the clip operations, back to front, that have been applied to | 1139 * Replays the clip operations, back to front, that have been applied to |
1135 * the canvas, calling the appropriate method on the visitor for each | 1140 * the canvas, calling the appropriate method on the visitor for each |
1136 * clip. All clips have already been transformed into device space. | 1141 * clip. All clips have already been transformed into device space. |
1137 */ | 1142 */ |
1138 void replayClips(ClipVisitor*) const; | 1143 void replayClips(ClipVisitor*) const; |
1139 | 1144 |
1140 /////////////////////////////////////////////////////////////////////////// | 1145 /////////////////////////////////////////////////////////////////////////// |
1141 | 1146 |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1497 | 1502 |
1498 class SkCanvasClipVisitor { | 1503 class SkCanvasClipVisitor { |
1499 public: | 1504 public: |
1500 virtual ~SkCanvasClipVisitor(); | 1505 virtual ~SkCanvasClipVisitor(); |
1501 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1506 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1502 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1507 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1503 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1508 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1504 }; | 1509 }; |
1505 | 1510 |
1506 #endif | 1511 #endif |
OLD | NEW |