diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-25 20:13:06 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-25 20:13:06 +0000 |
commit | 03c2ef5473cdffc9ec4ab52b106b3bdebab49de6 (patch) | |
tree | 3fc574dffab59e8c534bcb1098cbbb9801eedddb /samplecode | |
parent | 1fa803d6b4cb9d32dcfc5808af1ab654045a2592 (diff) |
inherit from SampleView
git-svn-id: http://skia.googlecode.com/svn/trunk@1421 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SamplePathFill.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/samplecode/SamplePathFill.cpp b/samplecode/SamplePathFill.cpp index d25917f925..845b7a88f9 100644 --- a/samplecode/SamplePathFill.cpp +++ b/samplecode/SamplePathFill.cpp @@ -97,7 +97,7 @@ static const MakePathProc gProcs[] = { #define N SK_ARRAY_COUNT(gProcs) -class PathFillView : public SkView { +class PathFillView : public SampleView { SkPath fPath[N]; SkScalar fDY[N]; @@ -106,6 +106,7 @@ public: for (size_t i = 0; i < N; i++) { fDY[i] = gProcs[i](&fPath[i]); } + this->setBGColor(0xFFDDDDDD); } protected: @@ -118,13 +119,7 @@ protected: return this->INHERITED::onQuery(evt); } - void drawBG(SkCanvas* canvas) { - canvas->drawColor(0xFFDDDDDD); - } - - virtual void onDraw(SkCanvas* canvas) { - this->drawBG(canvas); - + virtual void onDrawContent(SkCanvas* canvas) { SkPaint paint; paint.setAntiAlias(true); @@ -135,7 +130,7 @@ protected: } private: - typedef SkView INHERITED; + typedef SampleView INHERITED; }; ////////////////////////////////////////////////////////////////////////////// |