aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/quadpaths.cpp
diff options
context:
space:
mode:
authorGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-23 18:14:13 +0000
committerGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-23 18:14:13 +0000
commitd6176b0dcacb124539e0cfd051e6d93a9782f020 (patch)
tree9e6f4b465e54c9b26e1ba70cd8890b55abb08464 /gm/quadpaths.cpp
parentfbfcd5602128ec010c82cb733c9cdc0a3254f9f3 (diff)
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/quadpaths.cpp')
-rw-r--r--gm/quadpaths.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/gm/quadpaths.cpp b/gm/quadpaths.cpp
index f8b172bc6c..ac91c62df3 100644
--- a/gm/quadpaths.cpp
+++ b/gm/quadpaths.cpp
@@ -19,9 +19,9 @@ protected:
SkString onShortName() {
return SkString("quadpath");
}
-
+
SkISize onISize() { return make_isize(1240, 390); }
-
+
void drawPath(SkPath& path,SkCanvas* canvas,SkColor color,
const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join,
SkPaint::Style style, SkPath::FillType fill,
@@ -38,7 +38,7 @@ protected:
canvas->drawPath(path, paint);
canvas->restore();
}
-
+
virtual void onDraw(SkCanvas* canvas) {
struct FillAndName {
SkPath::FillType fFill;
@@ -110,19 +110,19 @@ protected:
if (0 < style) {
canvas->translate(rect.width() + 40 * SK_Scalar1, 0);
}
-
+
SkColor color = 0xff007000;
this->drawPath(path.fPath, canvas, color, rect,
gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle,
gFills[fill].fFill, SK_Scalar1*10);
-
+
SkPaint rectPaint;
rectPaint.setColor(SK_ColorBLACK);
rectPaint.setStyle(SkPaint::kStroke_Style);
rectPaint.setStrokeWidth(-1);
rectPaint.setAntiAlias(true);
canvas->drawRect(rect, rectPaint);
-
+
SkPaint labelPaint;
labelPaint.setColor(color);
labelPaint.setAntiAlias(true);
@@ -148,7 +148,7 @@ protected:
canvas->restore();
canvas->restore();
}
-
+
private:
typedef GM INHERITED;
};
@@ -161,9 +161,9 @@ protected:
SkString onShortName() {
return SkString("quadclosepath");
}
-
+
SkISize onISize() { return make_isize(1240, 390); }
-
+
void drawPath(SkPath& path,SkCanvas* canvas,SkColor color,
const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join,
SkPaint::Style style, SkPath::FillType fill,
@@ -180,7 +180,7 @@ protected:
canvas->drawPath(path, paint);
canvas->restore();
}
-
+
virtual void onDraw(SkCanvas* canvas) {
struct FillAndName {
SkPath::FillType fFill;
@@ -253,19 +253,19 @@ protected:
if (0 < style) {
canvas->translate(rect.width() + 40 * SK_Scalar1, 0);
}
-
+
SkColor color = 0xff007000;
this->drawPath(path.fPath, canvas, color, rect,
gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle,
gFills[fill].fFill, SK_Scalar1*10);
-
+
SkPaint rectPaint;
rectPaint.setColor(SK_ColorBLACK);
rectPaint.setStyle(SkPaint::kStroke_Style);
rectPaint.setStrokeWidth(-1);
rectPaint.setAntiAlias(true);
canvas->drawRect(rect, rectPaint);
-
+
SkPaint labelPaint;
labelPaint.setColor(color);
labelPaint.setAntiAlias(true);
@@ -291,7 +291,7 @@ protected:
canvas->restore();
canvas->restore();
}
-
+
private:
typedef GM INHERITED;
};