aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleLines.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/SampleLines.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/SampleLines.cpp')
-rw-r--r--samplecode/SampleLines.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/samplecode/SampleLines.cpp b/samplecode/SampleLines.cpp
index 0048d39f90..57d70509c7 100644
--- a/samplecode/SampleLines.cpp
+++ b/samplecode/SampleLines.cpp
@@ -32,8 +32,8 @@
class LinesView : public SampleView {
public:
- LinesView() {}
-
+ LinesView() {}
+
protected:
// overrides from SkEventSink
virtual bool onQuery(SkEvent* evt) {
@@ -49,12 +49,12 @@ protected:
*/
void drawRings(SkCanvas* canvas) {
canvas->scale(SkIntToScalar(1)/2, SkIntToScalar(1)/2);
-
- SkRect r;
+
+ SkRect r;
SkScalar x = SkIntToScalar(10);
SkScalar y = SkIntToScalar(10);
r.set(x, y, x + SkIntToScalar(100), y + SkIntToScalar(100));
-
+
SkPaint paint;
// paint.setAntiAlias(true);
paint.setStyle(SkPaint::kStroke_Style);
@@ -63,32 +63,32 @@ protected:
// paint.setColor(0xFFFFFFFF);
canvas->drawRect(r, paint);
}
-
+
virtual void onDrawContent(SkCanvas* canvas) {
SkBitmap bm;
SkImageDecoder::DecodeFile("/kill.gif", &bm);
canvas->drawBitmap(bm, 0, 0, NULL);
-
+
this->drawRings(canvas);
return;
SkPaint paint;
-
+
// fAlpha = 0x80;
paint.setColor(SK_ColorWHITE);
paint.setAlpha(fAlpha & 0xFF);
SkRect r;
-
+
SkScalar x = SkIntToScalar(10);
SkScalar y = SkIntToScalar(10);
r.set(x, y, x + SkIntToScalar(100), y + SkIntToScalar(100));
canvas->drawRect(r, paint);
return;
-
+
paint.setColor(0xffffff00); // yellow
paint.setStyle(SkPaint::kStroke_Style);
paint.setStrokeWidth(SkIntToScalar(2));
-
+
// y += SK_Scalar1/2;
canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), paint);