diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-04-13 13:50:27 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-04-13 13:50:27 +0000 |
commit | 90c07ea1d0aa6b7f20252c43fe23ee5ddc1d23cb (patch) | |
tree | 639c4244633bd0ae63819fcab794e97b3459d866 /include/core/SkCanvas.h | |
parent | 670ff9ae7f37356bff08b30a356bb0c52dc8d62e (diff) |
replace getTotalClipStack() with replayClips()+ClipVisitor
git-svn-id: http://skia.googlecode.com/svn/trunk@3670 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r-- | include/core/SkCanvas.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index a09a59261f..25cc94ab12 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -886,13 +886,20 @@ public: */ const SkRegion& getTotalClip() const; + void setExternalMatrix(const SkMatrix* = NULL); + + class ClipVisitor { + public: + virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; + virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; + }; + /** - * Return the current clipstack. This mirrors the result in getTotalClip() - * but is represented as a stack of geometric clips + region-ops. + * Replays the clip operations, back to front, that have been applied to + * the canvas, calling the appropriate method on the visitor for each + * clip. All clips have already been transformed into device space. */ - const SkClipStack& getTotalClipStack() const; - - void setExternalMatrix(const SkMatrix* = NULL); + void replayClips(ClipVisitor*) const; /////////////////////////////////////////////////////////////////////////// |