OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SKDEBUGCANVAS_H_ | 10 #ifndef SKDEBUGCANVAS_H_ |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 void setUserMatrix(SkMatrix matrix) { | 136 void setUserMatrix(SkMatrix matrix) { |
137 fUserMatrix = matrix; | 137 fUserMatrix = matrix; |
138 } | 138 } |
139 | 139 |
140 //////////////////////////////////////////////////////////////////////////////// | 140 //////////////////////////////////////////////////////////////////////////////// |
141 // Inherited from SkCanvas | 141 // Inherited from SkCanvas |
142 //////////////////////////////////////////////////////////////////////////////// | 142 //////////////////////////////////////////////////////////////////////////////// |
143 | 143 |
144 virtual void clear(SkColor) SK_OVERRIDE; | 144 virtual void clear(SkColor) SK_OVERRIDE; |
145 | 145 |
146 virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE; | |
147 | |
148 virtual bool clipRect(const SkRect&, SkRegion::Op, bool) SK_OVERRIDE; | |
149 | |
150 virtual bool clipRRect(const SkRRect& rrect, | |
151 SkRegion::Op op = SkRegion::kIntersect_Op, | |
152 bool doAntiAlias = false) SK_OVERRIDE; | |
153 | |
154 virtual bool clipRegion(const SkRegion& region, SkRegion::Op op) SK_OVERRIDE
; | |
155 | |
156 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; | 146 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; |
157 | 147 |
158 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top, | 148 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top, |
159 const SkPaint*) SK_OVERRIDE; | 149 const SkPaint*) SK_OVERRIDE; |
160 | 150 |
161 virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src, | 151 virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src, |
162 const SkRect& dst, const SkPaint* paint, | 152 const SkRect& dst, const SkPaint* paint, |
163 DrawBitmapRectFlags flags) SK_OVERRIDE; | 153 DrawBitmapRectFlags flags) SK_OVERRIDE; |
164 | 154 |
165 virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&, | 155 virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 216 |
227 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; | 217 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; |
228 | 218 |
229 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; | 219 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; |
230 | 220 |
231 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; | 221 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; |
232 | 222 |
233 static const int kVizImageHeight = 256; | 223 static const int kVizImageHeight = 256; |
234 static const int kVizImageWidth = 256; | 224 static const int kVizImageWidth = 256; |
235 | 225 |
| 226 virtual bool isClipEmpty() const SK_OVERRIDE { return false; } |
| 227 |
236 protected: | 228 protected: |
237 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 229 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; |
238 | 230 |
| 231 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 232 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; |
| 233 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 234 virtual void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE; |
| 235 |
239 private: | 236 private: |
240 SkTDArray<SkDrawCommand*> fCommandVector; | 237 SkTDArray<SkDrawCommand*> fCommandVector; |
241 int fWidth; | 238 int fWidth; |
242 int fHeight; | 239 int fHeight; |
243 bool fFilter; | 240 bool fFilter; |
244 int fIndex; | 241 int fIndex; |
245 SkMatrix fUserMatrix; | 242 SkMatrix fUserMatrix; |
246 SkMatrix fMatrix; | 243 SkMatrix fMatrix; |
247 SkIRect fClip; | 244 SkIRect fClip; |
248 | 245 |
(...skipping 20 matching lines...) Expand all Loading... |
269 /** | 266 /** |
270 Applies any panning and zooming the user has specified before | 267 Applies any panning and zooming the user has specified before |
271 drawing anything else into the canvas. | 268 drawing anything else into the canvas. |
272 */ | 269 */ |
273 void applyUserTransform(SkCanvas* canvas); | 270 void applyUserTransform(SkCanvas* canvas); |
274 | 271 |
275 typedef SkCanvas INHERITED; | 272 typedef SkCanvas INHERITED; |
276 }; | 273 }; |
277 | 274 |
278 #endif | 275 #endif |
OLD | NEW |