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 "SkTArray.h" | 9 #include "SkTArray.h" |
10 #include "SkMatrix.h" | 10 #include "SkMatrix.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 m.setSkew(1.5f, 1.5f); | 152 m.setSkew(1.5f, 1.5f); |
153 fMatrices.push_back(m); | 153 fMatrices.push_back(m); |
154 } | 154 } |
155 | 155 |
156 { | 156 { |
157 // 30 degree rotation | 157 // 30 degree rotation |
158 SkMatrix m; | 158 SkMatrix m; |
159 m.setRotate(SkIntToScalar(30)); | 159 m.setRotate(SkIntToScalar(30)); |
160 fMatrices.push_back(m); | 160 fMatrices.push_back(m); |
161 } | 161 } |
| 162 |
| 163 { |
| 164 // 90 degree rotation |
| 165 SkMatrix m; |
| 166 m.setRotate(SkIntToScalar(90)); |
| 167 fMatrices.push_back(m); |
| 168 } |
162 } | 169 } |
163 | 170 |
164 void makeRects() { | 171 void makeRects() { |
165 { | 172 { |
166 // small square | 173 // small square |
167 SkRect r = SkRect::MakeLTRB(0, 0, 30, 30); | 174 SkRect r = SkRect::MakeLTRB(0, 0, 30, 30); |
168 fRects.push_back(r); | 175 fRects.push_back(r); |
169 } | 176 } |
170 | 177 |
171 { | 178 { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 242 |
236 typedef GM INHERITED; | 243 typedef GM INHERITED; |
237 }; | 244 }; |
238 | 245 |
239 ////////////////////////////////////////////////////////////////////////////// | 246 ////////////////////////////////////////////////////////////////////////////// |
240 | 247 |
241 static GM* MyFactory(void*) { return new RectsGM; } | 248 static GM* MyFactory(void*) { return new RectsGM; } |
242 static GMRegistry reg(MyFactory); | 249 static GMRegistry reg(MyFactory); |
243 | 250 |
244 } | 251 } |
OLD | NEW |