aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SamplePathClip.cpp
diff options
context:
space:
mode:
authorGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-23 18:19:56 +0000
committerGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-23 18:19:56 +0000
commitae933ce0ea5fd9d21cb6ef2cee7e729d32690aac (patch)
tree62d80e33b16679d01454cf814977a7030d3a5462 /samplecode/SamplePathClip.cpp
parentd6176b0dcacb124539e0cfd051e6d93a9782f020 (diff)
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part III of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6475053 git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SamplePathClip.cpp')
-rw-r--r--samplecode/SamplePathClip.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/samplecode/SamplePathClip.cpp b/samplecode/SamplePathClip.cpp
index aa392da5c2..b999c39e55 100644
--- a/samplecode/SamplePathClip.cpp
+++ b/samplecode/SamplePathClip.cpp
@@ -26,15 +26,15 @@ public:
SkRect fOval;
SkPoint fCenter;
- PathClipView() {
+ PathClipView() {
fOval.set(0, 0, SkIntToScalar(200), SkIntToScalar(50));
fCenter.set(SkIntToScalar(250), SkIntToScalar(250));
-
+
// test_ats();
}
-
+
virtual ~PathClipView() {}
-
+
protected:
// overrides from SkEventSink
virtual bool onQuery(SkEvent* evt) {
@@ -44,14 +44,14 @@ protected:
}
return this->INHERITED::onQuery(evt);
}
-
+
virtual void onDrawContent(SkCanvas* canvas) {
SkRect oval = fOval;
oval.offset(fCenter.fX - oval.centerX(), fCenter.fY - oval.centerY());
-
+
SkPaint p;
p.setAntiAlias(true);
-
+
p.setStyle(SkPaint::kStroke_Style);
canvas->drawOval(oval, p);
@@ -59,11 +59,11 @@ protected:
r.set(SkIntToScalar(200), SkIntToScalar(200),
SkIntToScalar(300), SkIntToScalar(300));
canvas->clipRect(r);
-
+
p.setStyle(SkPaint::kFill_Style);
p.setColor(SK_ColorRED);
canvas->drawRect(r, p);
-
+
p.setColor(0x800000FF);
r.set(SkIntToScalar(150), SkIntToScalar(10),
SkIntToScalar(250), SkIntToScalar(400));
@@ -73,13 +73,13 @@ protected:
virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
return new Click(this);
}
-
+
virtual bool onClick(Click* click) {
fCenter.set(click->fCurr.fX, click->fCurr.fY);
this->inval(NULL);
return false;
}
-
+
private:
typedef SampleView INHERITED;
};