aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleTextBox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'samplecode/SampleTextBox.cpp')
-rw-r--r--samplecode/SampleTextBox.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/samplecode/SampleTextBox.cpp b/samplecode/SampleTextBox.cpp
index a2db0117cd..37a6be0936 100644
--- a/samplecode/SampleTextBox.cpp
+++ b/samplecode/SampleTextBox.cpp
@@ -32,7 +32,7 @@ static const char gText[] =
"a decent respect to the opinions of mankind requires that they should "
"declare the causes which impel them to the separation.";
-class TextBoxView : public SkView {
+class TextBoxView : public SampleView {
public:
TextBoxView() {
#ifdef SK_BUILD_FOR_WIN
@@ -60,13 +60,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) {
SkScalar margin = 20;
SkTextBox tbox;
tbox.setMode(SkTextBox::kLineBreak_Mode);