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

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

Issue 340453003: Add getCurrentClipPath() to SkCanvas. Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: add SkCanvas::getCurrentClipPath() Created 6 years, 6 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/SkCanvas.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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698