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
diff --git a/gm/hittestpath.cpp b/gm/hittestpath.cpp
index 83f3507..4347c9b 100644
--- a/gm/hittestpath.cpp
+++ b/gm/hittestpath.cpp
@@ -13,12 +13,12 @@
static void test_hittest(SkCanvas* canvas, const SkPath& path) {
SkPaint paint;
SkRect r = path.getBounds();
-
+
paint.setColor(SK_ColorRED);
canvas->drawPath(path, paint);
-
+
const SkScalar MARGIN = SkIntToScalar(4);
-
+
paint.setColor(0x800000FF);
for (SkScalar y = r.fTop + SK_ScalarHalf - MARGIN; y < r.fBottom + MARGIN; y += SK_Scalar1) {
for (SkScalar x = r.fLeft + SK_ScalarHalf - MARGIN; x < r.fRight + MARGIN; x += SK_Scalar1) {
@@ -32,18 +32,18 @@
class HitTestPathGM : public skiagm::GM {
public:
HitTestPathGM () {}
-
+
protected:
virtual SkString onShortName() {
return SkString("hittestpath");
}
-
+
virtual SkISize onISize() { return SkISize::Make(700, 460); }
-
+
virtual void onDraw(SkCanvas* canvas) {
SkPath path;
SkRandom rand;
-
+
int scale = 300;
for (int i = 0; i < 4; ++i) {
path.lineTo(rand.nextUScalar1() * scale, rand.nextUScalar1() * scale);
@@ -53,18 +53,18 @@
rand.nextUScalar1() * scale, rand.nextUScalar1() * scale,
rand.nextUScalar1() * scale, rand.nextUScalar1() * scale);
}
-
+
path.setFillType(SkPath::kEvenOdd_FillType);
path.offset(SkIntToScalar(20), SkIntToScalar(20));
-
+
test_hittest(canvas, path);
canvas->translate(SkIntToScalar(scale), 0);
path.setFillType(SkPath::kWinding_FillType);
-
+
test_hittest(canvas, path);
}
-
+
private:
typedef GM INHERITED;
};