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 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 | 394 |
395 void SkDebugCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { | 395 void SkDebugCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { |
396 // NOTE(chudy): Messing up when renamed to DrawRect... Why? | 396 // NOTE(chudy): Messing up when renamed to DrawRect... Why? |
397 addDrawCommand(new SkDrawRectCommand(rect, paint)); | 397 addDrawCommand(new SkDrawRectCommand(rect, paint)); |
398 } | 398 } |
399 | 399 |
400 void SkDebugCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { | 400 void SkDebugCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { |
401 addDrawCommand(new SkDrawRRectCommand(rrect, paint)); | 401 addDrawCommand(new SkDrawRRectCommand(rrect, paint)); |
402 } | 402 } |
403 | 403 |
| 404 void SkDebugCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, |
| 405 const SkPaint& paint) { |
| 406 // TODO: add DRRect to debugger |
| 407 } |
| 408 |
404 void SkDebugCanvas::drawSprite(const SkBitmap& bitmap, int left, int top, | 409 void SkDebugCanvas::drawSprite(const SkBitmap& bitmap, int left, int top, |
405 const SkPaint* paint = NULL) { | 410 const SkPaint* paint = NULL) { |
406 addDrawCommand(new SkDrawSpriteCommand(bitmap, left, top, paint)); | 411 addDrawCommand(new SkDrawSpriteCommand(bitmap, left, top, paint)); |
407 } | 412 } |
408 | 413 |
409 void SkDebugCanvas::drawText(const void* text, size_t byteLength, SkScalar x, | 414 void SkDebugCanvas::drawText(const void* text, size_t byteLength, SkScalar x, |
410 SkScalar y, const SkPaint& paint) { | 415 SkScalar y, const SkPaint& paint) { |
411 addDrawCommand(new SkDrawTextCommand(text, byteLength, x, y, paint)); | 416 addDrawCommand(new SkDrawTextCommand(text, byteLength, x, y, paint)); |
412 } | 417 } |
413 | 418 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 | 466 |
462 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { | 467 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { |
463 addDrawCommand(new SkTranslateCommand(dx, dy)); | 468 addDrawCommand(new SkTranslateCommand(dx, dy)); |
464 return true; | 469 return true; |
465 } | 470 } |
466 | 471 |
467 void SkDebugCanvas::toggleCommand(int index, bool toggle) { | 472 void SkDebugCanvas::toggleCommand(int index, bool toggle) { |
468 SkASSERT(index < fCommandVector.count()); | 473 SkASSERT(index < fCommandVector.count()); |
469 fCommandVector[index]->setVisible(toggle); | 474 fCommandVector[index]->setVisible(toggle); |
470 } | 475 } |
OLD | NEW |