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 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 * Returns false if the clip is empty, or if it is complex. | 1108 * Returns false if the clip is empty, or if it is complex. |
1109 */ | 1109 */ |
1110 virtual bool isClipRect() const; | 1110 virtual bool isClipRect() const; |
1111 | 1111 |
1112 /** Return the current matrix on the canvas. | 1112 /** Return the current matrix on the canvas. |
1113 This does not account for the translate in any of the devices. | 1113 This does not account for the translate in any of the devices. |
1114 @return The current matrix on the canvas. | 1114 @return The current matrix on the canvas. |
1115 */ | 1115 */ |
1116 const SkMatrix& getTotalMatrix() const; | 1116 const SkMatrix& getTotalMatrix() const; |
1117 | 1117 |
1118 #ifdef SK_SUPPORT_LEGACY_GETCLIPTYPE | |
1119 enum ClipType { | |
1120 kEmpty_ClipType = 0, | |
1121 kRect_ClipType, | |
1122 kComplex_ClipType | |
1123 }; | |
1124 /** Returns a description of the total clip; may be cheaper than | |
1125 getting the clip and querying it directly. | |
1126 */ | |
1127 virtual ClipType getClipType() const; | |
1128 #endif | |
1129 | |
1130 /** Return the clip stack. The clip stack stores all the individual | 1118 /** Return the clip stack. The clip stack stores all the individual |
1131 * clips organized by the save/restore frame in which they were | 1119 * clips organized by the save/restore frame in which they were |
1132 * added. | 1120 * added. |
1133 * @return the current clip stack ("list" of individual clip elements) | 1121 * @return the current clip stack ("list" of individual clip elements) |
1134 */ | 1122 */ |
1135 const SkClipStack* getClipStack() const { | 1123 const SkClipStack* getClipStack() const { |
1136 return &fClipStack; | 1124 return &fClipStack; |
1137 } | 1125 } |
1138 | 1126 |
1139 typedef SkCanvasClipVisitor ClipVisitor; | 1127 typedef SkCanvasClipVisitor ClipVisitor; |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1506 | 1494 |
1507 class SkCanvasClipVisitor { | 1495 class SkCanvasClipVisitor { |
1508 public: | 1496 public: |
1509 virtual ~SkCanvasClipVisitor(); | 1497 virtual ~SkCanvasClipVisitor(); |
1510 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1498 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1511 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1499 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1512 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1500 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1513 }; | 1501 }; |
1514 | 1502 |
1515 #endif | 1503 #endif |
OLD | NEW |