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

Side by Side Diff: samplecode/SamplePathClip.cpp

Issue 12480002: Fixing some warnings on Linux (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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 virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) { 73 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
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

Powered by Google App Engine
This is Rietveld 408576698