OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 #include "gm.h" | 8 #include "gm.h" |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkGradientShader.h" | 10 #include "SkGradientShader.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 SkPaint bgPaint; | 39 SkPaint bgPaint; |
40 bgPaint.setColor(0xFF70D0E0); | 40 bgPaint.setColor(0xFF70D0E0); |
41 canvas->drawPaint(bgPaint); | 41 canvas->drawPaint(bgPaint); |
42 } | 42 } |
43 | 43 |
44 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 44 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
45 canvas->translate(SkIntToScalar(10), SkIntToScalar(20)); | 45 canvas->translate(SkIntToScalar(10), SkIntToScalar(20)); |
46 | 46 |
47 SkPaint labelP; | 47 SkPaint labelP; |
48 labelP.setAntiAlias(true); | 48 labelP.setAntiAlias(true); |
| 49 sk_tool_utils::set_portable_typeface(&labelP); |
49 | 50 |
50 static const SkColor kSolidColors[] = { | 51 static const SkColor kSolidColors[] = { |
51 SK_ColorTRANSPARENT, | 52 SK_ColorTRANSPARENT, |
52 SK_ColorBLUE, | 53 SK_ColorBLUE, |
53 0x80808000 | 54 0x80808000 |
54 }; | 55 }; |
55 | 56 |
56 static const SkColor kBmpAlphas[] = { | 57 static const SkColor kBmpAlphas[] = { |
57 0xff, | 58 0xff, |
58 0x80, | 59 0x80, |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 SkAutoTUnref<SkShader> fBmpShader; | 237 SkAutoTUnref<SkShader> fBmpShader; |
237 | 238 |
238 typedef GM INHERITED; | 239 typedef GM INHERITED; |
239 }; | 240 }; |
240 | 241 |
241 ////////////////////////////////////////////////////////////////////////////// | 242 ////////////////////////////////////////////////////////////////////////////// |
242 | 243 |
243 DEF_GM(return new Xfermodes3GM;) | 244 DEF_GM(return new Xfermodes3GM;) |
244 | 245 |
245 } | 246 } |
OLD | NEW |