| 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 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 "Resources.h" | 8 #include "Resources.h" |
| 9 #include "SkFixed.h" | 9 #include "SkFixed.h" |
| 10 #include "SkFontDescriptor.h" | 10 #include "SkFontDescriptor.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 p.setAntiAlias(true); | 68 p.setAntiAlias(true); |
| 69 SkRect r; | 69 SkRect r; |
| 70 r.set(x - SkIntToScalar(3), SkIntToScalar(15), | 70 r.set(x - SkIntToScalar(3), SkIntToScalar(15), |
| 71 x - SkIntToScalar(1), SkIntToScalar(280)); | 71 x - SkIntToScalar(1), SkIntToScalar(280)); |
| 72 canvas->drawRect(r, p); | 72 canvas->drawRect(r, p); |
| 73 } | 73 } |
| 74 | 74 |
| 75 for (int ps = 6; ps <= 22; ps++) { | 75 for (int ps = 6; ps <= 22; ps++) { |
| 76 paint.setTextSize(SkIntToScalar(ps)); | 76 paint.setTextSize(SkIntToScalar(ps)); |
| 77 canvas->drawText(text, textLen, x, y, paint); | 77 canvas->drawText(text, textLen, x, y, paint); |
| 78 y += paint.getFontMetrics(NULL); | 78 y += paint.getFontMetrics(nullptr); |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 canvas->translate(0, SkIntToScalar(360)); | 81 canvas->translate(0, SkIntToScalar(360)); |
| 82 paint.setSubpixelText(true); | 82 paint.setSubpixelText(true); |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 typedef GM INHERITED; | 87 typedef GM INHERITED; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 ////////////////////////////////////////////////////////////////////////////// | 90 ////////////////////////////////////////////////////////////////////////////// |
| 91 | 91 |
| 92 static GM* MyFactory(void*) { return new FontScalerDistortableGM; } | 92 static GM* MyFactory(void*) { return new FontScalerDistortableGM; } |
| 93 static GMRegistry reg(MyFactory); | 93 static GMRegistry reg(MyFactory); |
| 94 | 94 |
| 95 } | 95 } |
| OLD | NEW |