From e72fee513a5f903d6aa17066d2f3b79ac31f05de Mon Sep 17 00:00:00 2001 From: "reed@android.com" Date: Mon, 16 Nov 2009 14:52:01 +0000 Subject: add onSendClickToChildren to views, so a view can capture all clicks. speedup some of the unittests that were too slow minor cleanup in SkScan_Path, in prep for larger changes git-svn-id: http://skia.googlecode.com/svn/trunk@426 2bbb7eff-a529-9590-31e7-b0007b416f81 --- samplecode/SamplePathClip.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'samplecode/SamplePathClip.cpp') diff --git a/samplecode/SamplePathClip.cpp b/samplecode/SamplePathClip.cpp index ece64ae75d..a126cbff80 100644 --- a/samplecode/SamplePathClip.cpp +++ b/samplecode/SamplePathClip.cpp @@ -119,9 +119,13 @@ protected: SkIntToScalar(250), SkIntToScalar(400)); canvas->drawOval(oval, p); } - + virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) { - fCenter.set(x, y); + return new Click(this); + } + + virtual bool onClick(Click* click) { + fCenter.set(click->fCurr.fX, click->fCurr.fY); this->inval(NULL); return NULL; } -- cgit v1.2.3