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 "SkGradientShader.h" | 10 #include "SkGradientShader.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 | 74 |
75 virtual SkISize onISize() { | 75 virtual SkISize onISize() { |
76 return SkISize::Make(640, 760); | 76 return SkISize::Make(640, 760); |
77 } | 77 } |
78 | 78 |
79 void drawContent(SkCanvas* canvas) { | 79 void drawContent(SkCanvas* canvas) { |
80 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); | 80 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); |
81 | 81 |
82 SkPaint paint; | 82 SkPaint paint; |
83 sk_tool_utils::set_portable_typeface(&paint); | 83 sk_tool_utils::set_portable_typeface_always(&paint); |
84 paint.setColor(0x80FF0000); | 84 paint.setColor(0x80F60000); |
85 | 85 |
86 const Proc procs[] = { | 86 const Proc procs[] = { |
87 draw_hair, draw_thick, draw_rect, draw_oval, draw_text | 87 draw_hair, draw_thick, draw_rect, draw_oval, draw_text |
88 }; | 88 }; |
89 | 89 |
90 const SkXfermode::Mode modes[] = { | 90 const SkXfermode::Mode modes[] = { |
91 SkXfermode::kSrcOver_Mode, SkXfermode::kSrc_Mode, SkXfermode::kClear
_Mode | 91 SkXfermode::kSrcOver_Mode, SkXfermode::kSrc_Mode, SkXfermode::kClear
_Mode |
92 }; | 92 }; |
93 | 93 |
94 const PaintProc paintProcs[] = { | 94 const PaintProc paintProcs[] = { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 surf->draw(canvas, 0, 0, NULL); | 141 surf->draw(canvas, 0, 0, NULL); |
142 } | 142 } |
143 | 143 |
144 private: | 144 private: |
145 typedef skiagm::GM INHERITED; | 145 typedef skiagm::GM INHERITED; |
146 }; | 146 }; |
147 | 147 |
148 /////////////////////////////////////////////////////////////////////////////// | 148 /////////////////////////////////////////////////////////////////////////////// |
149 | 149 |
150 DEF_GM(return new SrcModeGM;) | 150 DEF_GM(return new SrcModeGM;) |
OLD | NEW |