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
diff --git a/samplecode/SampleCull.cpp b/samplecode/SampleCull.cpp
index 778d0fc..18d9bdc 100644
--- a/samplecode/SampleCull.cpp
+++ b/samplecode/SampleCull.cpp
@@ -19,7 +19,7 @@
static void addbump(SkPath* path, const SkPoint pts[2], SkScalar bump) {
SkVector tang;
-
+
tang.setLength(pts[1].fX - pts[0].fX, pts[1].fY - pts[0].fY, bump);
path->lineTo(SkScalarHalf(pts[0].fX + pts[1].fX) - tang.fY,
@@ -31,7 +31,7 @@
SkPath::Iter iter(*path, false);
SkPoint pts[4];
SkPath tmp;
-
+
for (;;)
switch (iter.next(pts)) {
case SkPath::kMove_Verb:
@@ -90,7 +90,7 @@
break;
}
}
-
+
FINISHED2:
*count = n;
return array;
@@ -102,11 +102,11 @@
class CullView : public SampleView {
public:
- CullView() {
+ CullView() {
fClip.set(0, 0, SkIntToScalar(160), SkIntToScalar(160));
-
+
SkRandom rand;
-
+
for (int i = 0; i < 50; i++) {
SkScalar x = nextScalarRange(rand, -fClip.width()*1, fClip.width()*2);
SkScalar y = nextScalarRange(rand, -fClip.height()*1, fClip.height()*2);
@@ -115,16 +115,16 @@
else
fPath.lineTo(x, y);
}
-
+
SkScalar bump = fClip.width()/8;
subdivide(&fPath, bump);
subdivide(&fPath, bump);
subdivide(&fPath, bump);
fPoints = getpts(fPath, &fPtCount);
-
+
this->setBGColor(0xFFDDDDDD);
}
-
+
virtual ~CullView() {
delete[] fPoints;
}
@@ -138,7 +138,7 @@
}
return this->INHERITED::onQuery(evt);
}
-
+
virtual void onDrawContent(SkCanvas* canvas) {
SkAutoCanvasRestore ar(canvas, true);
@@ -148,7 +148,7 @@
// canvas->scale(SK_Scalar1*3, SK_Scalar1*3, 0, 0);
SkPaint paint;
-
+
// paint.setAntiAliasOn(true);
paint.setStyle(SkPaint::kStroke_Style);
@@ -165,21 +165,21 @@
SkPath tmp;
SkIRect iclip;
fClip.round(&iclip);
-
+
SkCullPointsPath cpp(iclip, &tmp);
-
+
cpp.moveTo(fPoints[0].fX, fPoints[0].fY);
for (int i = 0; i < fPtCount; i++)
cpp.lineTo(fPoints[i].fX, fPoints[i].fY);
-
+
paint.setColor(SK_ColorRED);
paint.setStrokeWidth(SkIntToScalar(3));
paint.setStrokeJoin(SkPaint::kRound_Join);
canvas->drawPath(tmp, paint);
-
+
this->inval(NULL);
}
-
+
private:
SkRect fClip;
SkIPoint* fPoints;