aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleStrokePath.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/SampleStrokePath.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/SampleStrokePath.cpp')
-rw-r--r--samplecode/SampleStrokePath.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/samplecode/SampleStrokePath.cpp b/samplecode/SampleStrokePath.cpp
index 1fb5fea094..ca5135d1f8 100644
--- a/samplecode/SampleStrokePath.cpp
+++ b/samplecode/SampleStrokePath.cpp
@@ -17,14 +17,14 @@
static void test_huge_stroke(SkCanvas* canvas) {
SkRect srcR = { 0, 0, 72000, 54000 };
SkRect dstR = { 0, 0, 640, 480 };
-
+
SkPath path;
path.moveTo(17600, 8000);
path.lineTo(52800, 8000);
path.lineTo(52800, 41600);
path.lineTo(17600, 41600);
path.close();
-
+
SkPaint paint;
paint.setAntiAlias(true);
paint.setStrokeWidth(8000);
@@ -54,7 +54,7 @@ static void test_blur() {
for (int x = 1; x <= 3; x++) {
src.fBounds.set(0, 0, x, y);
src.fRowBytes = src.fBounds.width();
-
+
SkScalar radius = 1.f;
printf("src [%d %d %d %d] radius %g\n", src.fBounds.fLeft, src.fBounds.fTop,
@@ -99,7 +99,7 @@ class StrokePathView : public SampleView {
SkScalar fWidth;
SkPath fPath;
public:
- StrokePathView() {
+ StrokePathView() {
// test_blur();
fWidth = SkIntToScalar(120);
@@ -114,14 +114,14 @@ public:
fPath.addCircle(0, 0, SkIntToScalar(50), SkPath::kCW_Direction);
fPath.addCircle(0, SkIntToScalar(-50), SkIntToScalar(30), SkPath::kCW_Direction);
#endif
-
+
scale_to_width(&fPath, fWidth);
const SkRect& bounds = fPath.getBounds();
fPath.offset(-bounds.fLeft, -bounds.fTop);
this->setBGColor(0xFFDDDDDD);
}
-
+
protected:
// overrides from SkEventSink
virtual bool onQuery(SkEvent* evt) {
@@ -131,9 +131,9 @@ protected:
}
return this->INHERITED::onQuery(evt);
}
-
+
SkRandom rand;
-
+
void drawSet(SkCanvas* canvas, SkPaint* paint) {
SkAutoCanvasRestore acr(canvas, true);
@@ -152,7 +152,7 @@ protected:
SkPaint paint;
paint.setAntiAlias(true);
-
+
if (true) {
canvas->drawColor(SK_ColorBLACK);
@@ -177,7 +177,7 @@ protected:
canvas->drawText("Title Bar", 9, x*SkIntToScalar(100), y*SkIntToScalar(30), paint);
radius *= 0.75f;
}
-
+
}
return;
}
@@ -200,10 +200,10 @@ protected:
fPath = p;
fPath.offset(100, 0);
#endif
-
+
fPath.setFillType(SkPath::kWinding_FillType);
drawSet(canvas, &paint);
-
+
canvas->translate(0, fPath.getBounds().height() * 5 / 4);
fPath.setFillType(SkPath::kEvenOdd_FillType);
drawSet(canvas, &paint);