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 | 8 |
9 #include "gm.h" | 9 #include "gm.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 SkScalar yF = 50.65f; | 31 SkScalar yF = 50.65f; |
32 | 32 |
33 fWidth = xF - xA; | 33 fWidth = xF - xA; |
34 fHeight = yF - yA; | 34 fHeight = yF - yA; |
35 | 35 |
36 fTotalWidth = kCols * fWidth + SK_Scalar1 * (kCols + 1) * kPadX; | 36 fTotalWidth = kCols * fWidth + SK_Scalar1 * (kCols + 1) * kPadX; |
37 fTotalHeight = kRows * fHeight + SK_Scalar1 * (kRows + 1) * kPadY; | 37 fTotalHeight = kRows * fHeight + SK_Scalar1 * (kRows + 1) * kPadY; |
38 } | 38 } |
39 | 39 |
40 protected: | 40 protected: |
41 void onOnceBeforeDraw() SK_OVERRIDE { | 41 void onOnceBeforeDraw() override { |
42 this->setBGColor(SkColorSetRGB(0xDD,0xA0,0xDD)); | 42 this->setBGColor(SkColorSetRGB(0xDD,0xA0,0xDD)); |
43 | 43 |
44 // offset the rects a bit so we get antialiasing even in the rect case | 44 // offset the rects a bit so we get antialiasing even in the rect case |
45 SkScalar xA = 0.65f; | 45 SkScalar xA = 0.65f; |
46 SkScalar xB = 10.65f; | 46 SkScalar xB = 10.65f; |
47 SkScalar xC = 20.65f; | 47 SkScalar xC = 20.65f; |
48 SkScalar xD = 30.65f; | 48 SkScalar xD = 30.65f; |
49 SkScalar xE = 40.65f; | 49 SkScalar xE = 40.65f; |
50 SkScalar xF = 50.65f; | 50 SkScalar xF = 50.65f; |
51 | 51 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, false); ) | 213 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, false); ) |
214 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, false); ) | 214 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, false); ) |
215 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, false); ) | 215 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, false); ) |
216 | 216 |
217 // aa | 217 // aa |
218 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, true); ) | 218 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, true); ) |
219 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, true); ) | 219 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, true); ) |
220 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, true); ) | 220 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, true); ) |
221 | 221 |
222 } | 222 } |
OLD | NEW |