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/SampleUnitMapper.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/SampleUnitMapper.cpp')
| -rw-r--r-- | samplecode/SampleUnitMapper.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/samplecode/SampleUnitMapper.cpp b/samplecode/SampleUnitMapper.cpp index e045d965ee..b20aece316 100644 --- a/samplecode/SampleUnitMapper.cpp +++ b/samplecode/SampleUnitMapper.cpp @@ -27,7 +27,7 @@ static void set_scalar(SkStaticTextView* view, SkScalar value) { view->setText(str); } -class UnitMapperView : public SkView { +class UnitMapperView : public SampleView { SkPoint fPts[4]; SkMatrix fMatrix; SkStaticTextView* fViews[4]; @@ -73,13 +73,7 @@ protected: return this->INHERITED::onQuery(evt); } - void drawBG(SkCanvas* canvas) { - canvas->drawColor(SK_ColorWHITE); - } - - virtual void onDraw(SkCanvas* canvas) { - this->drawBG(canvas); - + virtual void onDrawContent(SkCanvas* canvas) { SkPaint paint; paint.setAntiAlias(true); paint.setColor(0xFF8888FF); @@ -153,7 +147,7 @@ protected: private: int fDragIndex; - typedef SkView INHERITED; + typedef SampleView INHERITED; }; ////////////////////////////////////////////////////////////////////////////// |
