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 "SampleCode.h" | 8 #include "SampleCode.h" |
9 #include "SkView.h" | 9 #include "SkView.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 paint.setShader(fShader1); | 113 paint.setShader(fShader1); |
114 canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount, | 114 canvas->drawVertices(fRecs[i].fMode, fRecs[i].fCount, |
115 fRecs[i].fVerts, fRecs[i].fTexs, | 115 fRecs[i].fVerts, fRecs[i].fTexs, |
116 NULL, NULL, NULL, 0, paint); | 116 NULL, NULL, NULL, 0, paint); |
117 canvas->restore(); | 117 canvas->restore(); |
118 | 118 |
119 canvas->translate(0, SkIntToScalar(250)); | 119 canvas->translate(0, SkIntToScalar(250)); |
120 } | 120 } |
121 } | 121 } |
122 | 122 |
123 virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) { | 123 virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned)
SK_OVERRIDE { |
124 return new Click(this); | 124 return new Click(this); |
125 } | 125 } |
126 | 126 |
127 virtual bool onClick(Click* click) { | 127 virtual bool onClick(Click* click) { |
128 // fCurrX = click->fICurr.fX; | 128 // fCurrX = click->fICurr.fX; |
129 // fCurrY = click->fICurr.fY; | 129 // fCurrY = click->fICurr.fY; |
130 this->inval(NULL); | 130 this->inval(NULL); |
131 return true; | 131 return true; |
132 } | 132 } |
133 | 133 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 224 |
225 Rec fRecs[3]; | 225 Rec fRecs[3]; |
226 | 226 |
227 typedef SampleView INHERITED; | 227 typedef SampleView INHERITED; |
228 }; | 228 }; |
229 | 229 |
230 ////////////////////////////////////////////////////////////////////////////// | 230 ////////////////////////////////////////////////////////////////////////////// |
231 | 231 |
232 static SkView* MyFactory() { return new VerticesView; } | 232 static SkView* MyFactory() { return new VerticesView; } |
233 static SkViewRegister reg(MyFactory); | 233 static SkViewRegister reg(MyFactory); |
OLD | NEW |