aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/linepaths.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/linepaths.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/linepaths.cpp')
-rw-r--r--gm/linepaths.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/gm/linepaths.cpp b/gm/linepaths.cpp
index 3d84c379d7..fbf3faf947 100644
--- a/gm/linepaths.cpp
+++ b/gm/linepaths.cpp
@@ -19,9 +19,9 @@ protected:
SkString onShortName() {
return SkString("linepath");
}
-
+
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;
@@ -109,19 +109,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);
@@ -147,7 +147,7 @@ protected:
canvas->restore();
canvas->restore();
}
-
+
private:
typedef GM INHERITED;
};
@@ -160,9 +160,9 @@ protected:
SkString onShortName() {
return SkString("lineclosepath");
}
-
+
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,
@@ -179,7 +179,7 @@ protected:
canvas->drawPath(path, paint);
canvas->restore();
}
-
+
virtual void onDraw(SkCanvas* canvas) {
struct FillAndName {
SkPath::FillType fFill;
@@ -251,19 +251,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);
@@ -289,7 +289,7 @@ protected:
canvas->restore();
canvas->restore();
}
-
+
private:
typedef GM INHERITED;
};