OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkPath.h" | 10 #include "SkPath.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 SkPaint paint; | 52 SkPaint paint; |
53 paint.setAntiAlias(true); | 53 paint.setAntiAlias(true); |
54 paint.setStyle(SkPaint::kStroke_Style); | 54 paint.setStyle(SkPaint::kStroke_Style); |
55 paint.setColor(0xFF007700); | 55 paint.setColor(0xFF007700); |
56 | 56 |
57 canvas->drawPath(path, paint); | 57 canvas->drawPath(path, paint); |
58 } | 58 } |
59 | 59 |
60 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override
{ | 60 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override
{ |
61 fAngle = x/width(); | 61 fAngle = x/width(); |
62 this->inval(NULL); | 62 this->inval(nullptr); |
63 return NULL; | 63 return nullptr; |
64 } | 64 } |
65 private: | 65 private: |
66 | 66 |
67 SkScalar fAngle; | 67 SkScalar fAngle; |
68 typedef SampleView INHERITED; | 68 typedef SampleView INHERITED; |
69 }; | 69 }; |
70 | 70 |
71 ////////////////////////////////////////////////////////////////////////////// | 71 ////////////////////////////////////////////////////////////////////////////// |
72 | 72 |
73 static SkView* MyFactory() { return new StringArtView; } | 73 static SkView* MyFactory() { return new StringArtView; } |
74 static SkViewRegister reg(MyFactory); | 74 static SkViewRegister reg(MyFactory); |
OLD | NEW |