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 #include "gm.h" | 7 #include "gm.h" |
8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkGradientShader.h" | 9 #include "SkGradientShader.h" |
10 #include "SkPath.h" | 10 #include "SkPath.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 1.2f * w, 2.f * kPointSize), | 168 1.2f * w, 2.f * kPointSize), |
169 225.f, 359.f, | 169 225.f, 359.f, |
170 false); | 170 false); |
171 path.close(); | 171 path.close(); |
172 | 172 |
173 canvas->translate(0.f, kPointSize + kPadY); | 173 canvas->translate(0.f, kPointSize + kPadY); |
174 columnH += kPointSize + kPadY; | 174 columnH += kPointSize + kPadY; |
175 | 175 |
176 canvas->save(); | 176 canvas->save(); |
177 canvas->concat(matrices[m].fMatrix); | 177 canvas->concat(matrices[m].fMatrix); |
178 canvas->drawTextOnPath(kText, kTextLen, path, NULL, pain
t); | 178 canvas->drawTextOnPath(kText, kTextLen, path, nullptr, p
aint); |
179 canvas->drawTextOnPath(kText, kTextLen, path, NULL, outl
inePaint); | 179 canvas->drawTextOnPath(kText, kTextLen, path, nullptr, o
utlinePaint); |
180 canvas->restore(); | 180 canvas->restore(); |
181 SkPaint stroke; | 181 SkPaint stroke; |
182 stroke.setStyle(SkPaint::kStroke_Style); | 182 stroke.setStyle(SkPaint::kStroke_Style); |
183 canvas->translate(0.f, kPointSize + kPadY); | 183 canvas->translate(0.f, kPointSize + kPadY); |
184 columnH += kPointSize + kPadY; | 184 columnH += kPointSize + kPadY; |
185 } | 185 } |
186 canvas->restore(); | 186 canvas->restore(); |
187 canvas->translate(w + kPadX, 0.f); | 187 canvas->translate(w + kPadX, 0.f); |
188 } | 188 } |
189 if (0 == s) { | 189 if (0 == s) { |
(...skipping 12 matching lines...) Expand all Loading... |
202 | 202 |
203 private: | 203 private: |
204 typedef GM INHERITED; | 204 typedef GM INHERITED; |
205 }; | 205 }; |
206 | 206 |
207 /////////////////////////////////////////////////////////////////////////////// | 207 /////////////////////////////////////////////////////////////////////////////// |
208 | 208 |
209 static GM* MyFactory(void*) { return new ShaderText2GM; } | 209 static GM* MyFactory(void*) { return new ShaderText2GM; } |
210 static GMRegistry reg(MyFactory); | 210 static GMRegistry reg(MyFactory); |
211 } | 211 } |
OLD | NEW |