OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 SkPaint paint; | 188 SkPaint paint; |
189 paint.setAntiAlias(true); | 189 paint.setAntiAlias(true); |
190 paint.setTextSize(SkIntToScalar(56)); | 190 paint.setTextSize(SkIntToScalar(56)); |
191 | 191 |
192 SkScalar x = SkIntToScalar(20); | 192 SkScalar x = SkIntToScalar(20); |
193 SkScalar y = paint.getTextSize(); | 193 SkScalar y = paint.getTextSize(); |
194 | 194 |
195 SkString str("Hamburgefons"); | 195 SkString str("Hamburgefons"); |
196 | 196 |
197 for (size_t i = 0; i < SK_ARRAY_COUNT(gRastProcs); i++) { | 197 for (int i = 0; i < static_cast<int>(SK_ARRAY_COUNT(gRastProcs)); i++) { |
198 apply_shader(&paint, i); | 198 apply_shader(&paint, i); |
199 | 199 |
200 // paint.setMaskFilter(NULL); | 200 // paint.setMaskFilter(NULL); |
201 // paint.setColor(SK_ColorBLACK); | 201 // paint.setColor(SK_ColorBLACK); |
202 | 202 |
203 canvas->drawText(str.c_str(), str.size(), x, y, paint); | 203 canvas->drawText(str.c_str(), str.size(), x, y, paint); |
204 | 204 |
205 y += paint.getFontSpacing(); | 205 y += paint.getFontSpacing(); |
206 } | 206 } |
207 | 207 |
208 canvas->restore(); | 208 canvas->restore(); |
209 } | 209 } |
210 | 210 |
211 private: | 211 private: |
212 typedef skiagm::GM INHERITED; | 212 typedef skiagm::GM INHERITED; |
213 }; | 213 }; |
214 | 214 |
215 ////////////////////////////////////////////////////////////////////////////// | 215 ////////////////////////////////////////////////////////////////////////////// |
216 | 216 |
217 static skiagm::GM* MyFactory(void*) { return new TextEffectsGM; } | 217 static skiagm::GM* MyFactory(void*) { return new TextEffectsGM; } |
218 static skiagm::GMRegistry reg(MyFactory); | 218 static skiagm::GMRegistry reg(MyFactory); |
OLD | NEW |