| 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 "SampleCode.h" | 8 #include "SampleCode.h" |
| 9 #include "SkView.h" | 9 #include "SkView.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 canvas->drawText(text, textLen, 0, textBase, paint); | 178 canvas->drawText(text, textLen, 0, textBase, paint); |
| 179 canvas->restore(); | 179 canvas->restore(); |
| 180 canvas->save(); | 180 canvas->save(); |
| 181 ++i; | 181 ++i; |
| 182 canvas->translate(SkIntToScalar((i / testsPerCol) * colWidth), | 182 canvas->translate(SkIntToScalar((i / testsPerCol) * colWidth), |
| 183 SkIntToScalar((i % testsPerCol) * rowHeight)); | 183 SkIntToScalar((i % testsPerCol) * rowHeight)); |
| 184 canvas->drawTextOnPath(text, textLen, path, NULL, paint); | 184 canvas->drawTextOnPath(text, textLen, path, NULL, paint); |
| 185 canvas->restore(); | 185 canvas->restore(); |
| 186 } | 186 } |
| 187 canvas->restore(); | 187 canvas->restore(); |
| 188 | |
| 189 canvas->translate(0, SkIntToScalar(370)); | |
| 190 this->inval(NULL); | |
| 191 } | 188 } |
| 192 | 189 |
| 193 private: | 190 private: |
| 194 typedef SampleView INHERITED; | 191 typedef SampleView INHERITED; |
| 195 }; | 192 }; |
| 196 | 193 |
| 197 /////////////////////////////////////////////////////////////////////////////// | 194 /////////////////////////////////////////////////////////////////////////////// |
| 198 | 195 |
| 199 static SkView* MyFactory() { return new ShaderTextView; } | 196 static SkView* MyFactory() { return new ShaderTextView; } |
| 200 static SkViewRegister reg(MyFactory); | 197 static SkViewRegister reg(MyFactory); |
| OLD | NEW |