Chromium Code Reviews| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 | 91 |
| 92 // y += SK_Scalar1/2; | 92 // y += SK_Scalar1/2; |
| 93 | 93 |
| 94 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt); | 94 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt); |
| 95 | 95 |
| 96 paint.setAntiAlias(true); // with anti-aliasing | 96 paint.setAntiAlias(true); // with anti-aliasing |
| 97 y += SkIntToScalar(10); | 97 y += SkIntToScalar(10); |
| 98 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt); | 98 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), pai nt); |
| 99 } | 99 } |
| 100 | 100 |
| 101 virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) { | 101 virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) { |
|
sugoi
2013/03/06 16:14:59
virtual function's signature did not fit base clas
| |
| 102 fAlpha = SkScalarRound(y); | 102 fAlpha = SkScalarRound(y); |
| 103 this->inval(NULL); | 103 this->inval(NULL); |
| 104 return NULL; | 104 return NULL; |
| 105 } | 105 } |
| 106 private: | 106 private: |
| 107 | 107 |
| 108 int fAlpha; | 108 int fAlpha; |
| 109 typedef SampleView INHERITED; | 109 typedef SampleView INHERITED; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 ////////////////////////////////////////////////////////////////////////////// | 112 ////////////////////////////////////////////////////////////////////////////// |
| 113 | 113 |
| 114 static SkView* MyFactory() { return new LinesView; } | 114 static SkView* MyFactory() { return new LinesView; } |
| 115 static SkViewRegister reg(MyFactory); | 115 static SkViewRegister reg(MyFactory); |
| OLD | NEW |