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 | 9 |
10 #include "Resources.h" | 10 #include "Resources.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 fMatrix[0].setScale(horizScale, vertScale); | 55 fMatrix[0].setScale(horizScale, vertScale); |
56 fMatrix[1].setRotate(30, cx, cy); fMatrix[1].postScale(horizScale, vertS
cale); | 56 fMatrix[1].setRotate(30, cx, cy); fMatrix[1].postScale(horizScale, vertS
cale); |
57 } | 57 } |
58 | 58 |
59 public: | 59 public: |
60 SkBitmap fBM; | 60 SkBitmap fBM; |
61 SkMatrix fMatrix[2]; | 61 SkMatrix fMatrix[2]; |
62 SkString fName; | 62 SkString fName; |
63 | 63 |
64 FilterIndiaBoxGM() { | 64 FilterIndiaBoxGM() { |
65 this->setBGColor(0xFFDDDDDD); | 65 this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD)); |
66 } | 66 } |
67 | 67 |
68 FilterIndiaBoxGM(const char filename[]) : fFilename(filename) { | 68 FilterIndiaBoxGM(const char filename[]) : fFilename(filename) { |
69 fName.printf("filterindiabox"); | 69 fName.printf("filterindiabox"); |
70 } | 70 } |
71 | 71 |
72 protected: | 72 protected: |
73 SkString onShortName() override { | 73 SkString onShortName() override { |
74 return fName; | 74 return fName; |
75 } | 75 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 fSize = fBM.height(); | 116 fSize = fBM.height(); |
117 } | 117 } |
118 private: | 118 private: |
119 typedef skiagm::GM INHERITED; | 119 typedef skiagm::GM INHERITED; |
120 }; | 120 }; |
121 | 121 |
122 ////////////////////////////////////////////////////////////////////////////// | 122 ////////////////////////////////////////////////////////////////////////////// |
123 | 123 |
124 | 124 |
125 DEF_GM( return new FilterIndiaBoxGM("box.gif"); ) | 125 DEF_GM( return new FilterIndiaBoxGM("box.gif"); ) |
OLD | NEW |