update to SampleView
git-svn-id: http://skia.googlecode.com/svn/trunk@1460 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleOvalTest.cpp b/samplecode/SampleOvalTest.cpp
index daa479b..f625529 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 @@
fInsideColor = SkPreMultiplyColor(SK_ColorRED);
fOutsideColor = SkPreMultiplyColor(SK_ColorGREEN);
+
+ this->setBGColor(0xFFDDDDDD);
}
protected:
@@ -32,10 +34,6 @@
return this->INHERITED::onQuery(evt);
}
- void drawBG(SkCanvas* canvas) {
- canvas->drawColor(0xFFDDDDDD);
- }
-
void drawOval() {
SkCanvas canvas(fBitmap);
SkPaint p;
@@ -72,9 +70,7 @@
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 @@
}
private:
- typedef SkView INHERITED;
+ typedef SampleView INHERITED;
};
///////////////////////////////////////////////////////////////////////////////