| 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 "Test.h" | 8 #include "Test.h" |
| 9 #include "TestClassDef.h" | 9 #include "TestClassDef.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 path.reset(); | 823 path.reset(); |
| 824 path.addCircle(0, 0, SkIntToScalar(2), SkPath::kCW_Direction); | 824 path.addCircle(0, 0, SkIntToScalar(2), SkPath::kCW_Direction); |
| 825 path.addCircle(0, 0, SkIntToScalar(1), SkPath::kCCW_Direction); | 825 path.addCircle(0, 0, SkIntToScalar(1), SkPath::kCCW_Direction); |
| 826 check_direction(reporter, path, SkPath::kCW_Direction); | 826 check_direction(reporter, path, SkPath::kCW_Direction); |
| 827 | 827 |
| 828 path.reset(); | 828 path.reset(); |
| 829 path.addCircle(0, 0, SkIntToScalar(1), SkPath::kCW_Direction); | 829 path.addCircle(0, 0, SkIntToScalar(1), SkPath::kCW_Direction); |
| 830 path.addCircle(0, 0, SkIntToScalar(2), SkPath::kCCW_Direction); | 830 path.addCircle(0, 0, SkIntToScalar(2), SkPath::kCCW_Direction); |
| 831 check_direction(reporter, path, SkPath::kCCW_Direction); | 831 check_direction(reporter, path, SkPath::kCCW_Direction); |
| 832 | 832 |
| 833 #ifdef SK_SCALAR_IS_FLOAT | |
| 834 // triangle with one point really far from the origin. | 833 // triangle with one point really far from the origin. |
| 835 path.reset(); | 834 path.reset(); |
| 836 // the first point is roughly 1.05e10, 1.05e10 | 835 // the first point is roughly 1.05e10, 1.05e10 |
| 837 path.moveTo(SkBits2Float(0x501c7652), SkBits2Float(0x501c7652)); | 836 path.moveTo(SkBits2Float(0x501c7652), SkBits2Float(0x501c7652)); |
| 838 path.lineTo(110 * SK_Scalar1, -10 * SK_Scalar1); | 837 path.lineTo(110 * SK_Scalar1, -10 * SK_Scalar1); |
| 839 path.lineTo(-10 * SK_Scalar1, 60 * SK_Scalar1); | 838 path.lineTo(-10 * SK_Scalar1, 60 * SK_Scalar1); |
| 840 check_direction(reporter, path, SkPath::kCCW_Direction); | 839 check_direction(reporter, path, SkPath::kCCW_Direction); |
| 841 #endif | |
| 842 | 840 |
| 843 path.reset(); | 841 path.reset(); |
| 844 path.conicTo(20, 0, 20, 20, 0.5f); | 842 path.conicTo(20, 0, 20, 20, 0.5f); |
| 845 path.close(); | 843 path.close(); |
| 846 check_direction(reporter, path, SkPath::kCW_Direction); | 844 check_direction(reporter, path, SkPath::kCW_Direction); |
| 847 | 845 |
| 848 path.reset(); | 846 path.reset(); |
| 849 path.lineTo(1, 1e7f); | 847 path.lineTo(1, 1e7f); |
| 850 path.lineTo(1e7f, 2e7f); | 848 path.lineTo(1e7f, 2e7f); |
| 851 path.close(); | 849 path.close(); |
| (...skipping 2510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3362 test_rrect(reporter); | 3360 test_rrect(reporter); |
| 3363 test_arc(reporter); | 3361 test_arc(reporter); |
| 3364 test_arcTo(reporter); | 3362 test_arcTo(reporter); |
| 3365 test_addPath(reporter); | 3363 test_addPath(reporter); |
| 3366 test_conicTo_special_case(reporter); | 3364 test_conicTo_special_case(reporter); |
| 3367 test_get_point(reporter); | 3365 test_get_point(reporter); |
| 3368 test_contains(reporter); | 3366 test_contains(reporter); |
| 3369 PathTest_Private::TestPathTo(reporter); | 3367 PathTest_Private::TestPathTo(reporter); |
| 3370 PathRefTest_Private::TestPathRef(reporter); | 3368 PathRefTest_Private::TestPathRef(reporter); |
| 3371 } | 3369 } |
| OLD | NEW |