| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BD-style license that can be | 4 * Use of this source code is governed by a BD-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 | 9 |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 } | 24 } |
| 25 | 25 |
| 26 SkISize onISize() override { | 26 SkISize onISize() override { |
| 27 return SkISize::Make(kWidth, kHeight); | 27 return SkISize::Make(kWidth, kHeight); |
| 28 } | 28 } |
| 29 | 29 |
| 30 void onDraw(SkCanvas* canvas) override { | 30 void onDraw(SkCanvas* canvas) override { |
| 31 const char text[] = "Hamburgefons"; | 31 const char text[] = "Hamburgefons"; |
| 32 | 32 |
| 33 SkPaint paint; | 33 SkPaint paint; |
| 34 sk_tool_utils::set_portable_typeface(&paint); | 34 sk_tool_utils::set_portable_typeface_always(&paint); |
| 35 paint.setTextSize(20); | 35 paint.setTextSize(20); |
| 36 paint.setAntiAlias(true); | 36 paint.setAntiAlias(true); |
| 37 paint.setLCDRenderText(true); | 37 paint.setLCDRenderText(true); |
| 38 | 38 |
| 39 SkTextBlobBuilder builder; | 39 SkTextBlobBuilder builder; |
| 40 | 40 |
| 41 sk_tool_utils::add_to_text_blob(&builder, text, paint, 10, 10); | 41 sk_tool_utils::add_to_text_blob(&builder, text, paint, 10, 10); |
| 42 | 42 |
| 43 SkAutoTUnref<const SkTextBlob> blob(builder.build()); | 43 SkAutoTUnref<const SkTextBlob> blob(builder.build()); |
| 44 | 44 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 72 static const int kWidth = 200; | 72 static const int kWidth = 200; |
| 73 static const int kHeight = 200; | 73 static const int kHeight = 200; |
| 74 | 74 |
| 75 typedef GM INHERITED; | 75 typedef GM INHERITED; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 ////////////////////////////////////////////////////////////////////////////// | 78 ////////////////////////////////////////////////////////////////////////////// |
| 79 | 79 |
| 80 DEF_GM( return SkNEW(TextBlobGeometryChange); ) | 80 DEF_GM( return SkNEW(TextBlobGeometryChange); ) |
| 81 } | 81 } |
| OLD | NEW |