OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 /* Tests text vertical text rendering with different fonts and centering. | 10 /* Tests text vertical text rendering with different fonts and centering. |
(...skipping 13 matching lines...) Expand all Loading... |
24 fProp = SkTypeface::CreateFromName("Helvetica", SkTypeface::kNormal); | 24 fProp = SkTypeface::CreateFromName("Helvetica", SkTypeface::kNormal); |
25 fMono = SkTypeface::CreateFromName("Courier New", SkTypeface::kNormal); | 25 fMono = SkTypeface::CreateFromName("Courier New", SkTypeface::kNormal); |
26 } | 26 } |
27 | 27 |
28 virtual ~VertText2GM() { | 28 virtual ~VertText2GM() { |
29 SkSafeUnref(fProp); | 29 SkSafeUnref(fProp); |
30 SkSafeUnref(fMono); | 30 SkSafeUnref(fMono); |
31 } | 31 } |
32 | 32 |
33 protected: | 33 protected: |
| 34 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 35 return kSkipTiled_Flag; |
| 36 } |
| 37 |
34 | 38 |
35 SkString onShortName() { | 39 SkString onShortName() { |
36 return SkString("verttext2"); | 40 return SkString("verttext2"); |
37 } | 41 } |
38 | 42 |
39 SkISize onISize() { return make_isize(640, 480); } | 43 SkISize onISize() { return make_isize(640, 480); } |
40 | 44 |
41 virtual void onDraw(SkCanvas* canvas) { | 45 virtual void onDraw(SkCanvas* canvas) { |
42 | 46 |
43 for (int i = 0; i < 3; ++i) { | 47 for (int i = 0; i < 3; ++i) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 SkTypeface* fProp; | 93 SkTypeface* fProp; |
90 SkTypeface* fMono; | 94 SkTypeface* fMono; |
91 }; | 95 }; |
92 | 96 |
93 /////////////////////////////////////////////////////////////////////////////// | 97 /////////////////////////////////////////////////////////////////////////////// |
94 | 98 |
95 static GM* MyFactory(void*) { return new VertText2GM; } | 99 static GM* MyFactory(void*) { return new VertText2GM; } |
96 static GMRegistry reg(MyFactory); | 100 static GMRegistry reg(MyFactory); |
97 | 101 |
98 } | 102 } |
OLD | NEW |