OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "gm.h" | 8 #include "gm.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkCullPoints.h" | |
11 #include "SkPath.h" | 10 #include "SkPath.h" |
12 #include "SkRandom.h" | 11 #include "SkRandom.h" |
13 | 12 |
14 static void test_hittest(SkCanvas* canvas, const SkPath& path) { | 13 static void test_hittest(SkCanvas* canvas, const SkPath& path) { |
15 SkPaint paint; | 14 SkPaint paint; |
16 SkRect r = path.getBounds(); | 15 SkRect r = path.getBounds(); |
17 | 16 |
18 paint.setColor(SK_ColorRED); | 17 paint.setColor(SK_ColorRED); |
19 canvas->drawPath(path, paint); | 18 canvas->drawPath(path, paint); |
20 | 19 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 path.setFillType(SkPath::kEvenOdd_FillType); | 51 path.setFillType(SkPath::kEvenOdd_FillType); |
53 path.offset(SkIntToScalar(20), SkIntToScalar(20)); | 52 path.offset(SkIntToScalar(20), SkIntToScalar(20)); |
54 | 53 |
55 test_hittest(canvas, path); | 54 test_hittest(canvas, path); |
56 | 55 |
57 canvas->translate(SkIntToScalar(scale), 0); | 56 canvas->translate(SkIntToScalar(scale), 0); |
58 path.setFillType(SkPath::kWinding_FillType); | 57 path.setFillType(SkPath::kWinding_FillType); |
59 | 58 |
60 test_hittest(canvas, path); | 59 test_hittest(canvas, path); |
61 } | 60 } |
OLD | NEW |