Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: samplecode/SamplePathClip.cpp

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « samplecode/SamplePath.cpp ('k') | samplecode/SamplePathEffects.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 p.setStyle(SkPaint::kFill_Style); 63 p.setStyle(SkPaint::kFill_Style);
64 p.setColor(SK_ColorRED); 64 p.setColor(SK_ColorRED);
65 canvas->drawRect(r, p); 65 canvas->drawRect(r, p);
66 66
67 p.setColor(0x800000FF); 67 p.setColor(0x800000FF);
68 r.set(SkIntToScalar(150), SkIntToScalar(10), 68 r.set(SkIntToScalar(150), SkIntToScalar(10),
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) SK_OVERR IDE { 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 virtual bool onClick(Click* click) { 77 virtual bool onClick(Click* click) {
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(NULL);
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);
OLDNEW
« no previous file with comments | « samplecode/SamplePath.cpp ('k') | samplecode/SamplePathEffects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698