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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 * @return the current clip stack ("list" of individual clip elements) | 983 * @return the current clip stack ("list" of individual clip elements) |
984 */ | 984 */ |
985 const SkClipStack* getClipStack() const { | 985 const SkClipStack* getClipStack() const { |
986 return &fClipStack; | 986 return &fClipStack; |
987 } | 987 } |
988 | 988 |
989 class ClipVisitor { | 989 class ClipVisitor { |
990 public: | 990 public: |
991 virtual ~ClipVisitor(); | 991 virtual ~ClipVisitor(); |
992 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 992 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 993 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0
; |
993 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 994 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
994 }; | 995 }; |
995 | 996 |
996 /** | 997 /** |
997 * Replays the clip operations, back to front, that have been applied to | 998 * Replays the clip operations, back to front, that have been applied to |
998 * the canvas, calling the appropriate method on the visitor for each | 999 * the canvas, calling the appropriate method on the visitor for each |
999 * clip. All clips have already been transformed into device space. | 1000 * clip. All clips have already been transformed into device space. |
1000 */ | 1001 */ |
1001 void replayClips(ClipVisitor*) const; | 1002 void replayClips(ClipVisitor*) const; |
1002 | 1003 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 bool asROBitmap(SkBitmap*) const; | 1272 bool asROBitmap(SkBitmap*) const; |
1272 | 1273 |
1273 private: | 1274 private: |
1274 SkBitmap fBitmap; // used if peekPixels() fails | 1275 SkBitmap fBitmap; // used if peekPixels() fails |
1275 const void* fAddr; // NULL on failure | 1276 const void* fAddr; // NULL on failure |
1276 SkImageInfo fInfo; | 1277 SkImageInfo fInfo; |
1277 size_t fRowBytes; | 1278 size_t fRowBytes; |
1278 }; | 1279 }; |
1279 | 1280 |
1280 #endif | 1281 #endif |
OLD | NEW |