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 #include "gm.h" | 8 #include "gm.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
11 #include "SkPath.h" | |
12 #include "SkRandom.h" | 11 #include "SkRandom.h" |
13 #include "SkTemplates.h" | 12 #include "SkTemplates.h" |
14 | 13 |
15 class GetPosTextPathGM : public skiagm::GM { | 14 class GetPosTextPathGM : public skiagm::GM { |
16 public: | 15 public: |
17 GetPosTextPathGM() {} | 16 GetPosTextPathGM() {} |
18 | 17 |
19 protected: | 18 protected: |
20 | 19 |
21 SkString onShortName() override { | 20 SkString onShortName() override { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 canvas->drawPosText(text, len, &pos[0], paint); | 66 canvas->drawPosText(text, len, &pos[0], paint); |
68 paint.getPosTextPath(text, len, &pos[0], &path); | 67 paint.getPosTextPath(text, len, &pos[0], &path); |
69 strokePath(canvas, path); | 68 strokePath(canvas, path); |
70 } | 69 } |
71 }; | 70 }; |
72 | 71 |
73 ////////////////////////////////////////////////////////////////////////////// | 72 ////////////////////////////////////////////////////////////////////////////// |
74 | 73 |
75 static skiagm::GM* F(void*) { return new GetPosTextPathGM; } | 74 static skiagm::GM* F(void*) { return new GetPosTextPathGM; } |
76 static skiagm::GMRegistry gR(F); | 75 static skiagm::GMRegistry gR(F); |
OLD | NEW |