OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
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 SKDRAWCOMMAND_H_ | 8 #ifndef SKDRAWCOMMAND_H_ |
9 #define SKDRAWCOMMAND_H_ | 9 #define SKDRAWCOMMAND_H_ |
10 | 10 |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 | 490 |
491 typedef SkDrawCommand INHERITED; | 491 typedef SkDrawCommand INHERITED; |
492 }; | 492 }; |
493 | 493 |
494 class SkDrawPosTextHCommand : public SkDrawCommand { | 494 class SkDrawPosTextHCommand : public SkDrawCommand { |
495 public: | 495 public: |
496 SkDrawPosTextHCommand(const void* text, size_t byteLength, const SkScalar xp
os[], | 496 SkDrawPosTextHCommand(const void* text, size_t byteLength, const SkScalar xp
os[], |
497 SkScalar constY, const SkPaint& paint); | 497 SkScalar constY, const SkPaint& paint); |
498 virtual ~SkDrawPosTextHCommand() { delete [] fXpos; delete [] fText; } | 498 virtual ~SkDrawPosTextHCommand() { delete [] fXpos; delete [] fText; } |
499 void execute(SkCanvas* canvas) const override; | 499 void execute(SkCanvas* canvas) const override; |
| 500 Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
| 501 static SkDrawPosTextHCommand* fromJSON(Json::Value& command, UrlDataManager&
urlDataManager); |
500 | 502 |
501 private: | 503 private: |
502 SkScalar* fXpos; | 504 SkScalar* fXpos; |
503 char* fText; | 505 char* fText; |
504 size_t fByteLength; | 506 size_t fByteLength; |
505 SkScalar fConstY; | 507 SkScalar fConstY; |
506 SkPaint fPaint; | 508 SkPaint fPaint; |
507 | 509 |
508 typedef SkDrawCommand INHERITED; | 510 typedef SkDrawCommand INHERITED; |
509 }; | 511 }; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 static SkSetMatrixCommand* fromJSON(Json::Value& command, UrlDataManager& ur
lDataManager); | 668 static SkSetMatrixCommand* fromJSON(Json::Value& command, UrlDataManager& ur
lDataManager); |
667 | 669 |
668 private: | 670 private: |
669 SkMatrix fUserMatrix; | 671 SkMatrix fUserMatrix; |
670 SkMatrix fMatrix; | 672 SkMatrix fMatrix; |
671 | 673 |
672 typedef SkDrawCommand INHERITED; | 674 typedef SkDrawCommand INHERITED; |
673 }; | 675 }; |
674 | 676 |
675 #endif | 677 #endif |
OLD | NEW |