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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 SkIntToScalar(250), SkIntToScalar(400)); | 69 SkIntToScalar(250), SkIntToScalar(400)); |
70 canvas->drawOval(oval, p); | 70 canvas->drawOval(oval, p); |
71 } | 71 } |
72 | 72 |
73 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override
{ | 73 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override
{ |
74 return new Click(this); | 74 return new Click(this); |
75 } | 75 } |
76 | 76 |
77 bool onClick(Click* click) override { | 77 bool onClick(Click* click) override { |
78 fCenter.set(click->fCurr.fX, click->fCurr.fY); | 78 fCenter.set(click->fCurr.fX, click->fCurr.fY); |
79 this->inval(NULL); | 79 this->inval(nullptr); |
80 return false; | 80 return false; |
81 } | 81 } |
82 | 82 |
83 private: | 83 private: |
84 typedef SampleView INHERITED; | 84 typedef SampleView INHERITED; |
85 }; | 85 }; |
86 | 86 |
87 ////////////////////////////////////////////////////////////////////////////// | 87 ////////////////////////////////////////////////////////////////////////////// |
88 | 88 |
89 static SkView* MyFactory() { return new PathClipView; } | 89 static SkView* MyFactory() { return new PathClipView; } |
90 static SkViewRegister reg(MyFactory); | 90 static SkViewRegister reg(MyFactory); |
OLD | NEW |