| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 void setUserMatrix(SkMatrix matrix) { | 138 void setUserMatrix(SkMatrix matrix) { |
| 139 fUserMatrix = matrix; | 139 fUserMatrix = matrix; |
| 140 } | 140 } |
| 141 | 141 |
| 142 //////////////////////////////////////////////////////////////////////////////// | 142 //////////////////////////////////////////////////////////////////////////////// |
| 143 // Inherited from SkCanvas | 143 // Inherited from SkCanvas |
| 144 //////////////////////////////////////////////////////////////////////////////// | 144 //////////////////////////////////////////////////////////////////////////////// |
| 145 | 145 |
| 146 virtual void clear(SkColor) SK_OVERRIDE; | 146 virtual void clear(SkColor) SK_OVERRIDE; |
| 147 | 147 |
| 148 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; | |
| 149 | |
| 150 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top, | 148 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top, |
| 151 const SkPaint*) SK_OVERRIDE; | 149 const SkPaint*) SK_OVERRIDE; |
| 152 | 150 |
| 153 virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src, | 151 virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src, |
| 154 const SkRect& dst, const SkPaint* paint, | 152 const SkRect& dst, const SkPaint* paint, |
| 155 DrawBitmapRectFlags flags) SK_OVERRIDE; | 153 DrawBitmapRectFlags flags) SK_OVERRIDE; |
| 156 | 154 |
| 157 virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&, | 155 virtual void drawBitmapMatrix(const SkBitmap&, const SkMatrix&, |
| 158 const SkPaint*) SK_OVERRIDE; | 156 const SkPaint*) SK_OVERRIDE; |
| 159 | 157 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 virtual void drawTextOnPath(const void* text, size_t byteLength, | 197 virtual void drawTextOnPath(const void* text, size_t byteLength, |
| 200 const SkPath& path, const SkMatrix* matrix, | 198 const SkPath& path, const SkMatrix* matrix, |
| 201 const SkPaint&) SK_OVERRIDE; | 199 const SkPaint&) SK_OVERRIDE; |
| 202 | 200 |
| 203 virtual void drawVertices(VertexMode, int vertexCount, | 201 virtual void drawVertices(VertexMode, int vertexCount, |
| 204 const SkPoint vertices[], const SkPoint texs[], | 202 const SkPoint vertices[], const SkPoint texs[], |
| 205 const SkColor colors[], SkXfermode*, | 203 const SkColor colors[], SkXfermode*, |
| 206 const uint16_t indices[], int indexCount, | 204 const uint16_t indices[], int indexCount, |
| 207 const SkPaint&) SK_OVERRIDE; | 205 const SkPaint&) SK_OVERRIDE; |
| 208 | 206 |
| 209 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; | |
| 210 | |
| 211 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; | |
| 212 | |
| 213 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; | |
| 214 | |
| 215 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; | |
| 216 | |
| 217 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; | |
| 218 | |
| 219 static const int kVizImageHeight = 256; | 207 static const int kVizImageHeight = 256; |
| 220 static const int kVizImageWidth = 256; | 208 static const int kVizImageWidth = 256; |
| 221 | 209 |
| 222 virtual bool isClipEmpty() const SK_OVERRIDE { return false; } | 210 virtual bool isClipEmpty() const SK_OVERRIDE { return false; } |
| 223 virtual bool isClipRect() const SK_OVERRIDE { return true; } | 211 virtual bool isClipRect() const SK_OVERRIDE { return true; } |
| 224 #ifdef SK_SUPPORT_LEGACY_GETCLIPTYPE | 212 #ifdef SK_SUPPORT_LEGACY_GETCLIPTYPE |
| 225 virtual ClipType getClipType() const SK_OVERRIDE { | 213 virtual ClipType getClipType() const SK_OVERRIDE { |
| 226 return kRect_ClipType; | 214 return kRect_ClipType; |
| 227 } | 215 } |
| 228 #endif | 216 #endif |
| (...skipping 10 matching lines...) Expand all Loading... |
| 239 bounds->setLargest(); | 227 bounds->setLargest(); |
| 240 } | 228 } |
| 241 return true; | 229 return true; |
| 242 } | 230 } |
| 243 | 231 |
| 244 protected: | 232 protected: |
| 245 virtual void willSave(SaveFlags) SK_OVERRIDE; | 233 virtual void willSave(SaveFlags) SK_OVERRIDE; |
| 246 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; | 234 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; |
| 247 virtual void willRestore() SK_OVERRIDE; | 235 virtual void willRestore() SK_OVERRIDE; |
| 248 | 236 |
| 237 virtual void didTranslate(SkScalar, SkScalar) SK_OVERRIDE; |
| 238 virtual void didScale(SkScalar, SkScalar) SK_OVERRIDE; |
| 239 virtual void didRotate(SkScalar) SK_OVERRIDE; |
| 240 virtual void didSkew(SkScalar, SkScalar) SK_OVERRIDE; |
| 241 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; |
| 242 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; |
| 243 |
| 249 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 244 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; |
| 250 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE; | 245 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE; |
| 251 virtual void onPopCull() SK_OVERRIDE; | 246 virtual void onPopCull() SK_OVERRIDE; |
| 252 | 247 |
| 253 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 248 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 254 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; | 249 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; |
| 255 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 250 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 256 virtual void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE; | 251 virtual void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE; |
| 257 | 252 |
| 258 void markActiveCommands(int index); | 253 void markActiveCommands(int index); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 /** | 298 /** |
| 304 Applies any panning and zooming the user has specified before | 299 Applies any panning and zooming the user has specified before |
| 305 drawing anything else into the canvas. | 300 drawing anything else into the canvas. |
| 306 */ | 301 */ |
| 307 void applyUserTransform(SkCanvas* canvas); | 302 void applyUserTransform(SkCanvas* canvas); |
| 308 | 303 |
| 309 typedef SkCanvas INHERITED; | 304 typedef SkCanvas INHERITED; |
| 310 }; | 305 }; |
| 311 | 306 |
| 312 #endif | 307 #endif |
| OLD | NEW |