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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 void SkDebugCanvas::drawPath(const SkPath& path, const SkPaint& paint) { | 388 void SkDebugCanvas::drawPath(const SkPath& path, const SkPaint& paint) { |
389 SkBitmap bitmap = createBitmap(path); | 389 SkBitmap bitmap = createBitmap(path); |
390 addDrawCommand(new DrawPath(path, paint, bitmap)); | 390 addDrawCommand(new DrawPath(path, paint, bitmap)); |
391 } | 391 } |
392 | 392 |
393 void SkDebugCanvas::drawPicture(SkPicture& picture) { | 393 void SkDebugCanvas::drawPicture(SkPicture& picture) { |
394 addDrawCommand(new DrawPicture(picture)); | 394 addDrawCommand(new DrawPicture(picture)); |
395 } | 395 } |
396 | 396 |
397 void SkDebugCanvas::drawPoints(PointMode mode, size_t count, | 397 void SkDebugCanvas::drawPoints(PointMode mode, size_t count, |
398 const SkPoint pts[], const SkPaint& paint) { | 398 const SkPoint pts[], const SkPaint& paint) { |
399 addDrawCommand(new DrawPoints(mode, count, pts, paint)); | 399 addDrawCommand(new DrawPoints(mode, count, pts, paint)); |
400 } | 400 } |
401 | 401 |
402 void SkDebugCanvas::drawPosText(const void* text, size_t byteLength, | 402 void SkDebugCanvas::drawPosText(const void* text, size_t byteLength, |
403 const SkPoint pos[], const SkPaint& paint) { | 403 const SkPoint pos[], const SkPaint& paint) { |
404 addDrawCommand(new DrawPosText(text, byteLength, pos, paint)); | 404 addDrawCommand(new DrawPosText(text, byteLength, pos, paint)); |
405 } | 405 } |
406 | 406 |
407 void SkDebugCanvas::drawPosTextH(const void* text, size_t byteLength, | 407 void SkDebugCanvas::drawPosTextH(const void* text, size_t byteLength, |
408 const SkScalar xpos[], SkScalar constY, const SkPaint& paint) { | 408 const SkScalar xpos[], SkScalar constY, const SkPaint& paint) { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 478 |
479 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { | 479 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { |
480 addDrawCommand(new Translate(dx, dy)); | 480 addDrawCommand(new Translate(dx, dy)); |
481 return true; | 481 return true; |
482 } | 482 } |
483 | 483 |
484 void SkDebugCanvas::toggleCommand(int index, bool toggle) { | 484 void SkDebugCanvas::toggleCommand(int index, bool toggle) { |
485 SkASSERT(index < fCommandVector.count()); | 485 SkASSERT(index < fCommandVector.count()); |
486 fCommandVector[index]->setVisible(toggle); | 486 fCommandVector[index]->setVisible(toggle); |
487 } | 487 } |
OLD | NEW |