diff options
author | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:14:13 +0000 |
---|---|---|
committer | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:14:13 +0000 |
commit | d6176b0dcacb124539e0cfd051e6d93a9782f020 (patch) | |
tree | 9e6f4b465e54c9b26e1ba70cd8890b55abb08464 /gm/hittestpath.cpp | |
parent | fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 (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/hittestpath.cpp')
-rw-r--r-- | gm/hittestpath.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gm/hittestpath.cpp b/gm/hittestpath.cpp index 83f3507da1..4347c9b22f 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 @@ static void test_hittest(SkCanvas* canvas, const SkPath& path) { 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 @@ protected: 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; }; |