diff options
author | 2011-06-01 12:42:36 +0000 | |
---|---|---|
committer | 2011-06-01 12:42:36 +0000 | |
commit | 81e3d7f7943d5c257a07580b75218a5e256b0aad (patch) | |
tree | 24c4fd42bb177403cced6bd437d3a8cef4c7621d /samplecode/SampleSlides.cpp | |
parent | e5ff43906603dff33e14086cf1e5d73c157d2e8e (diff) |
update to SampleView
git-svn-id: http://skia.googlecode.com/svn/trunk@1460 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleSlides.cpp')
-rw-r--r-- | samplecode/SampleSlides.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp index 3d2a61e5fb..3b7d05b0d2 100644 --- a/samplecode/SampleSlides.cpp +++ b/samplecode/SampleSlides.cpp @@ -749,7 +749,7 @@ static const SlideProc gProc[] = { texteffect_slide }; -class SlideView : public SkView { +class SlideView : public SampleView { int fIndex; public: SlideView() { @@ -770,6 +770,7 @@ public: str.printf("/skimages/slide_%d.png", i); SkImageEncoder::EncodeFile(str.c_str(), bm, SkImageEncoder::kPNG_Type, 100); } + this->setBGColor(BG_COLOR); } protected: @@ -782,8 +783,7 @@ protected: return this->INHERITED::onQuery(evt); } - virtual void onDraw(SkCanvas* canvas) { - canvas->drawColor(BG_COLOR); + virtual void onDrawContent(SkCanvas* canvas) { gProc[fIndex](canvas); } @@ -794,7 +794,7 @@ protected: } private: - typedef SkView INHERITED; + typedef SampleView INHERITED; }; ////////////////////////////////////////////////////////////////////////////// |