diff options
| author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-01 12:42:36 +0000 |
|---|---|---|
| committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-01 12:42:36 +0000 |
| commit | 81e3d7f7943d5c257a07580b75218a5e256b0aad (patch) | |
| tree | 24c4fd42bb177403cced6bd437d3a8cef4c7621d /samplecode/SampleOvalTest.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/SampleOvalTest.cpp')
| -rw-r--r-- | samplecode/SampleOvalTest.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/samplecode/SampleOvalTest.cpp b/samplecode/SampleOvalTest.cpp index daa479b165..f62552946a 100644 --- a/samplecode/SampleOvalTest.cpp +++ b/samplecode/SampleOvalTest.cpp @@ -5,7 +5,7 @@ static const int kILimit = 101; static const SkScalar kLimit = SK_Scalar1 * kILimit; -class OvalTestView : public SkView { +class OvalTestView : public SampleView { public: SkSize fSize; SkPMColor fInsideColor; // signals an interior pixel that was not set @@ -20,6 +20,8 @@ public: fInsideColor = SkPreMultiplyColor(SK_ColorRED); fOutsideColor = SkPreMultiplyColor(SK_ColorGREEN); + + this->setBGColor(0xFFDDDDDD); } protected: @@ -32,10 +34,6 @@ protected: return this->INHERITED::onQuery(evt); } - void drawBG(SkCanvas* canvas) { - canvas->drawColor(0xFFDDDDDD); - } - void drawOval() { SkCanvas canvas(fBitmap); SkPaint p; @@ -72,9 +70,7 @@ protected: return flatc + buldgec; } - virtual void onDraw(SkCanvas* canvas) { - this->drawBG(canvas); - + virtual void onDrawContent(SkCanvas* canvas) { this->drawOval(); int flatCount, buldgeCount; this->checkOval(&flatCount, &buldgeCount); @@ -104,7 +100,7 @@ protected: } private: - typedef SkView INHERITED; + typedef SampleView INHERITED; }; /////////////////////////////////////////////////////////////////////////////// |
