OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkRandom.h" | 9 #include "SkRandom.h" |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 protected: | 22 protected: |
23 virtual SkString onShortName() SK_OVERRIDE { | 23 virtual SkString onShortName() SK_OVERRIDE { |
24 return SkString("arcofzorro"); | 24 return SkString("arcofzorro"); |
25 } | 25 } |
26 | 26 |
27 virtual SkISize onISize() SK_OVERRIDE { | 27 virtual SkISize onISize() SK_OVERRIDE { |
28 return make_isize(1000, 1000); | 28 return make_isize(1000, 1000); |
29 } | 29 } |
30 | 30 |
31 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 31 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
32 SkMWCRandom rand; | 32 SkRandom rand; |
33 | 33 |
34 SkRect rect = SkRect::MakeXYWH(10, 10, 200, 200); | 34 SkRect rect = SkRect::MakeXYWH(10, 10, 200, 200); |
35 | 35 |
36 SkPaint p; | 36 SkPaint p; |
37 | 37 |
38 p.setStyle(SkPaint::kStroke_Style); | 38 p.setStyle(SkPaint::kStroke_Style); |
39 p.setStrokeWidth(35); | 39 p.setStrokeWidth(35); |
40 int xOffset = 0, yOffset = 0; | 40 int xOffset = 0, yOffset = 0; |
41 int direction = 0; | 41 int direction = 0; |
42 | 42 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 private: | 75 private: |
76 typedef GM INHERITED; | 76 typedef GM INHERITED; |
77 }; | 77 }; |
78 | 78 |
79 ////////////////////////////////////////////////////////////////////////////// | 79 ////////////////////////////////////////////////////////////////////////////// |
80 | 80 |
81 DEF_GM( return SkNEW(ArcOfZorroGM); ) | 81 DEF_GM( return SkNEW(ArcOfZorroGM); ) |
82 | 82 |
83 } | 83 } |
OLD | NEW |