diff options
| author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-05 14:03:48 +0000 |
|---|---|---|
| committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-05 14:03:48 +0000 |
| commit | 961ddb04a0a7aba843032d829ab867518e52559e (patch) | |
| tree | acab8fac9ac1f56650b3b2ef9ab7aff5384466ed /samplecode/SampleEmboss.cpp | |
| parent | 2ba4abbb3171e058b7f9b1d7c7954ee6989a21e6 (diff) | |
update to SampleView
git-svn-id: http://skia.googlecode.com/svn/trunk@1252 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleEmboss.cpp')
| -rw-r--r-- | samplecode/SampleEmboss.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/samplecode/SampleEmboss.cpp b/samplecode/SampleEmboss.cpp index d12074f05b..8b3f194ccd 100644 --- a/samplecode/SampleEmboss.cpp +++ b/samplecode/SampleEmboss.cpp @@ -19,11 +19,10 @@ #include "SkTypeface.h" #include "SkXfermode.h" -class EmbossView : public SkView { +class EmbossView : public SampleView { SkEmbossMaskFilter::Light fLight; public: - EmbossView() - { + EmbossView() { fLight.fDirection[0] = SK_Scalar1; fLight.fDirection[1] = SK_Scalar1; fLight.fDirection[2] = SK_Scalar1; @@ -33,25 +32,15 @@ public: protected: // overrides from SkEventSink - virtual bool onQuery(SkEvent* evt) - { - if (SampleCode::TitleQ(*evt)) - { + virtual bool onQuery(SkEvent* evt) { + if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Emboss"); return true; } 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); @@ -67,7 +56,7 @@ protected: private: - typedef SkView INHERITED; + typedef SampleView INHERITED; }; ////////////////////////////////////////////////////////////////////////////// |
