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 "SkBlurMaskFilter.h" | 9 #include "SkBlurMaskFilter.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 createShader(); | 88 createShader(); |
89 createMaskFilter(); | 89 createMaskFilter(); |
90 | 90 |
91 canvas->save(); | 91 canvas->save(); |
92 | 92 |
93 // draw a letter "M" with a green & red striped texture and a | 93 // draw a letter "M" with a green & red striped texture and a |
94 // stipple mask with a round rect soft clip | 94 // stipple mask with a round rect soft clip |
95 SkPaint paint; | 95 SkPaint paint; |
96 paint.setAntiAlias(true); | 96 paint.setAntiAlias(true); |
97 paint.setTextSize(72); | 97 paint.setTextSize(72); |
98 paint.setShader(fShader.get()); | 98 paint.setShader(fShader); |
99 paint.setMaskFilter(fMaskFilter.get()); | 99 paint.setMaskFilter(fMaskFilter.get()); |
100 sk_tool_utils::set_portable_typeface(&paint); | 100 sk_tool_utils::set_portable_typeface(&paint); |
101 | 101 |
102 SkRect temp; | 102 SkRect temp; |
103 temp.set(SkIntToScalar(115), | 103 temp.set(SkIntToScalar(115), |
104 SkIntToScalar(75), | 104 SkIntToScalar(75), |
105 SkIntToScalar(144), | 105 SkIntToScalar(144), |
106 SkIntToScalar(110)); | 106 SkIntToScalar(110)); |
107 | 107 |
108 SkPath path; | 108 SkPath path; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 142 |
143 typedef GM INHERITED; | 143 typedef GM INHERITED; |
144 }; | 144 }; |
145 | 145 |
146 ////////////////////////////////////////////////////////////////////////////// | 146 ////////////////////////////////////////////////////////////////////////////// |
147 | 147 |
148 static GM* MyFactory(void*) { return new SamplerStressGM; } | 148 static GM* MyFactory(void*) { return new SamplerStressGM; } |
149 static GMRegistry reg(MyFactory); | 149 static GMRegistry reg(MyFactory); |
150 | 150 |
151 } | 151 } |
OLD | NEW |