OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "gm.h" | 8 #include "gm.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 SkPoint fPts[3]; | 162 SkPoint fPts[3]; |
163 | 163 |
164 public: | 164 public: |
165 EmptyStrokeGM() { | 165 EmptyStrokeGM() { |
166 fPts[0].set(40, 40); | 166 fPts[0].set(40, 40); |
167 fPts[1].set(80, 40); | 167 fPts[1].set(80, 40); |
168 fPts[2].set(120, 40); | 168 fPts[2].set(120, 40); |
169 } | 169 } |
170 | 170 |
171 protected: | 171 protected: |
172 SkString onShortName() { | 172 SkString onShortName() override { |
173 return SkString("emptystroke"); | 173 return SkString("emptystroke"); |
174 } | 174 } |
175 | 175 |
176 SkISize onISize() override { return SkISize::Make(200, 240); } | 176 SkISize onISize() override { return SkISize::Make(200, 240); } |
177 | 177 |
178 void onDraw(SkCanvas* canvas) override { | 178 void onDraw(SkCanvas* canvas) override { |
179 const MakePathProc procs[] = { | 179 const MakePathProc procs[] = { |
180 make_path_move, // expect red red red | 180 make_path_move, // expect red red red |
181 make_path_move_close, // expect black black black | 181 make_path_move_close, // expect black black black |
182 make_path_move_line, // expect black black black | 182 make_path_move_line, // expect black black black |
(...skipping 18 matching lines...) Expand all Loading... |
201 canvas->translate(0, 40); | 201 canvas->translate(0, 40); |
202 } | 202 } |
203 } | 203 } |
204 | 204 |
205 private: | 205 private: |
206 typedef GM INHERITED; | 206 typedef GM INHERITED; |
207 }; | 207 }; |
208 DEF_GM( return new EmptyStrokeGM; ) | 208 DEF_GM( return new EmptyStrokeGM; ) |
209 | 209 |
210 } | 210 } |
OLD | NEW |