diff options
author | mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-05 01:59:48 +0000 |
---|---|---|
committer | mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-05 01:59:48 +0000 |
commit | 5fd9243fd6b82aa3f2a2fae7c62310e77ab7b6d3 (patch) | |
tree | f24879abbfb8ee487aba55d4da42b6f08a6b1c67 /samplecode/SampleEffects.cpp | |
parent | f871268f560915d523f492cd6d2a2c6146d17d6f (diff) |
switch to inheriting from SampleView
git-svn-id: http://skia.googlecode.com/svn/trunk@1249 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleEffects.cpp')
-rw-r--r-- | samplecode/SampleEffects.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/samplecode/SampleEffects.cpp b/samplecode/SampleEffects.cpp index 97853c3c6b..158a89f5d9 100644 --- a/samplecode/SampleEffects.cpp +++ b/samplecode/SampleEffects.cpp @@ -65,7 +65,7 @@ const PaintProc gPaintProcs[] = { /////////////////////////////////////////////////////////////////////////////// -class EffectsView : public SkView { +class EffectsView : public SampleView { public: SkPath fPath; SkPaint fPaint[SK_ARRAY_COUNT(gPaintProcs)]; @@ -96,6 +96,8 @@ public: SkColorMatrix cm; cm.setRotate(SkColorMatrix::kG_Axis, 180); cm.setIdentity(); + + this->setBGColor(0xFFDDDDDD); } protected: @@ -108,13 +110,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) { canvas->scale(3, 3); canvas->translate(10, 30); for (size_t i = 0; i < SK_ARRAY_COUNT(fPaint); i++) { @@ -124,7 +120,7 @@ protected: } private: - typedef SkView INHERITED; + typedef SampleView INHERITED; }; /////////////////////////////////////////////////////////////////////////////// |