| 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 "SkTypeface.h" | 8 #include "SkTypeface.h" |
| 9 | 9 |
| 10 namespace skiagm { | 10 namespace skiagm { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 protected: | 21 protected: |
| 22 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 22 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 23 return kSkipTiled_Flag; | 23 return kSkipTiled_Flag; |
| 24 } | 24 } |
| 25 | 25 |
| 26 virtual SkString onShortName() { | 26 virtual SkString onShortName() { |
| 27 return SkString("fontscaler"); | 27 return SkString("fontscaler"); |
| 28 } | 28 } |
| 29 | 29 |
| 30 virtual SkISize onISize() { | 30 virtual SkISize onISize() { |
| 31 return make_isize(1450, 750); | 31 return SkISize::Make(1450, 750); |
| 32 } | 32 } |
| 33 | 33 |
| 34 static void rotate_about(SkCanvas* canvas, | 34 static void rotate_about(SkCanvas* canvas, |
| 35 SkScalar degrees, | 35 SkScalar degrees, |
| 36 SkScalar px, SkScalar py) { | 36 SkScalar px, SkScalar py) { |
| 37 canvas->translate(px, py); | 37 canvas->translate(px, py); |
| 38 canvas->rotate(degrees); | 38 canvas->rotate(degrees); |
| 39 canvas->translate(-px, -py); | 39 canvas->translate(-px, -py); |
| 40 } | 40 } |
| 41 | 41 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 private: | 88 private: |
| 89 typedef GM INHERITED; | 89 typedef GM INHERITED; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 ////////////////////////////////////////////////////////////////////////////// | 92 ////////////////////////////////////////////////////////////////////////////// |
| 93 | 93 |
| 94 static GM* MyFactory(void*) { return new FontScalerGM; } | 94 static GM* MyFactory(void*) { return new FontScalerGM; } |
| 95 static GMRegistry reg(MyFactory); | 95 static GMRegistry reg(MyFactory); |
| 96 | 96 |
| 97 } | 97 } |
| OLD | NEW |