| 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 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 * @return the current clip stack ("list" of individual clip elements) | 997 * @return the current clip stack ("list" of individual clip elements) |
| 998 */ | 998 */ |
| 999 const SkClipStack* getClipStack() const { | 999 const SkClipStack* getClipStack() const { |
| 1000 return &fClipStack; | 1000 return &fClipStack; |
| 1001 } | 1001 } |
| 1002 | 1002 |
| 1003 class ClipVisitor { | 1003 class ClipVisitor { |
| 1004 public: | 1004 public: |
| 1005 virtual ~ClipVisitor(); | 1005 virtual ~ClipVisitor(); |
| 1006 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1006 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1007 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0
; |
| 1007 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1008 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1008 }; | 1009 }; |
| 1009 | 1010 |
| 1010 /** | 1011 /** |
| 1011 * Replays the clip operations, back to front, that have been applied to | 1012 * Replays the clip operations, back to front, that have been applied to |
| 1012 * the canvas, calling the appropriate method on the visitor for each | 1013 * the canvas, calling the appropriate method on the visitor for each |
| 1013 * clip. All clips have already been transformed into device space. | 1014 * clip. All clips have already been transformed into device space. |
| 1014 */ | 1015 */ |
| 1015 void replayClips(ClipVisitor*) const; | 1016 void replayClips(ClipVisitor*) const; |
| 1016 | 1017 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1284 bool asROBitmap(SkBitmap*) const; | 1285 bool asROBitmap(SkBitmap*) const; |
| 1285 | 1286 |
| 1286 private: | 1287 private: |
| 1287 SkBitmap fBitmap; // used if peekPixels() fails | 1288 SkBitmap fBitmap; // used if peekPixels() fails |
| 1288 const void* fAddr; // NULL on failure | 1289 const void* fAddr; // NULL on failure |
| 1289 SkImageInfo fInfo; | 1290 SkImageInfo fInfo; |
| 1290 size_t fRowBytes; | 1291 size_t fRowBytes; |
| 1291 }; | 1292 }; |
| 1292 | 1293 |
| 1293 #endif | 1294 #endif |
| OLD | NEW |