| 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 | 7 |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkPath.h" | 10 #include "SkPath.h" |
| (...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("stroke-fill"); | 27 return SkString("stroke-fill"); |
| 28 } | 28 } |
| 29 | 29 |
| 30 virtual SkISize onISize() { | 30 virtual SkISize onISize() { |
| 31 return make_isize(640, 480); | 31 return SkISize::Make(640, 480); |
| 32 } | 32 } |
| 33 | 33 |
| 34 static void show_bold(SkCanvas* canvas, const void* text, int len, | 34 static void show_bold(SkCanvas* canvas, const void* text, int len, |
| 35 SkScalar x, SkScalar y, const SkPaint& paint) { | 35 SkScalar x, SkScalar y, const SkPaint& paint) { |
| 36 SkPaint p(paint); | 36 SkPaint p(paint); |
| 37 canvas->drawText(text, len, x, y, p); | 37 canvas->drawText(text, len, x, y, p); |
| 38 p.setFakeBoldText(true); | 38 p.setFakeBoldText(true); |
| 39 canvas->drawText(text, len, x, y + SkIntToScalar(120), p); | 39 canvas->drawText(text, len, x, y + SkIntToScalar(120), p); |
| 40 } | 40 } |
| 41 | 41 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 StrokeFillGM; } | 92 static GM* MyFactory(void*) { return new StrokeFillGM; } |
| 93 static GMRegistry reg(MyFactory); | 93 static GMRegistry reg(MyFactory); |
| 94 | 94 |
| 95 } | 95 } |
| OLD | NEW |