OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #include "PathOpsCubicIntersectionTestData.h" | 7 #include "PathOpsCubicIntersectionTestData.h" |
8 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
9 #include "SkGeometry.h" | 9 #include "SkGeometry.h" |
10 #include "SkIntersections.h" | 10 #include "SkIntersections.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 {{{18.1312339, 31.6473732}, {95.5711034, 63.5350219}, {92.3283165, 62.0158945}, | 157 {{{18.1312339, 31.6473732}, {95.5711034, 63.5350219}, {92.3283165, 62.0158945}, |
158 {18.5656052, 32.1268808}}}, | 158 {18.5656052, 32.1268808}}}, |
159 {{{97.402018, 35.7169972}, {33.1127443, 25.8935163}, {1.13970027, 54.9424981}, | 159 {{{97.402018, 35.7169972}, {33.1127443, 25.8935163}, {1.13970027, 54.9424981}, |
160 {56.4860195, 60.529264}}}, | 160 {56.4860195, 60.529264}}}, |
161 }; | 161 }; |
162 | 162 |
163 const int testSetCount = (int) SK_ARRAY_COUNT(testSet); | 163 const int testSetCount = (int) SK_ARRAY_COUNT(testSet); |
164 | 164 |
165 static const SkDCubic newTestSet[] = { | 165 static const SkDCubic newTestSet[] = { |
| 166 {{{1,3}, {-1.0564518,1.79032254}, {1.45265341,0.229448318}, {1.45381773,0.229133
77}}}, |
| 167 {{{1.45381773,0.22913377}, {1.45425761,0.229014933}, {1.0967741,0.451612949}, {0
,1}}}, |
| 168 |
| 169 {{{1.64551306f, 3.57876182f}, {0.298127174f, 3.70454836f}, {-0.809808373f, 6.395
24937f}, {-3.66666651f, 13.333334f}}}, |
| 170 {{{1, 2}, {1, 2}, {-3.66666651f, 13.333334f}, {5, 6}}}, |
| 171 |
| 172 {{{0.0660428554,1.65340209}, {-0.251940489,1.43560803}, {-0.782382965,-0.1962990
91}, {3.33333325,-0.666666627}}}, |
| 173 {{{1,3}, {-1.22353387,1.09411383}, {0.319867611,0.12996155}, {0.886705518,0.1075
43148}}}, |
| 174 |
| 175 {{{-0.13654758,2.10514426}, {-0.585797966,1.89349782}, {-0.807703257,-0.19230639
9}, {6,-1}}}, |
| 176 {{{1,4}, {-2.25000453,1.42241001}, {1.1314013,0.0505309105}, {1.87140274,0.03637
64353}}}, |
| 177 |
| 178 {{{1.3127951622009277, 2.0637707710266113}, {1.8210518360137939, 1.9148571491241
455}, {1.6106204986572266, -0.68700540065765381}, {8.5, -2.5}}}, |
| 179 {{{3, 4}, {0.33333325386047363, 1.3333332538604736}, {3.6666667461395264, -0.666
66674613952637}, {3.6666665077209473, -0.66666656732559204}}}, |
| 180 |
166 {{{980.026001,1481.276}, {980.026001,1481.276}, {980.02594,1481.27576}, {980.025
879,1481.27527}}}, | 181 {{{980.026001,1481.276}, {980.026001,1481.276}, {980.02594,1481.27576}, {980.025
879,1481.27527}}}, |
167 {{{980.025879,1481.27527}, {980.025452,1481.27222}, {980.023743,1481.26038}, {98
0.02179,1481.24072}}}, | 182 {{{980.025879,1481.27527}, {980.025452,1481.27222}, {980.023743,1481.26038}, {98
0.02179,1481.24072}}}, |
168 | 183 |
169 {{{1.80943513,3.07782435}, {1.66686702,2.16806936}, {1.68301272,0}, {3,0}}}, | 184 {{{1.80943513,3.07782435}, {1.66686702,2.16806936}, {1.68301272,0}, {3,0}}}, |
170 {{{0,1}, {0,3}, {3,2}, {5,2}}}, | 185 {{{0,1}, {0,3}, {3,2}, {5,2}}}, |
171 | 186 |
172 {{{3.4386673,2.66977954}, {4.06668949,2.17046738}, {4.78887367,1.59629118}, {6,2
}}}, | 187 {{{3.4386673,2.66977954}, {4.06668949,2.17046738}, {4.78887367,1.59629118}, {6,2
}}}, |
173 {{{1.71985495,3.49467373}, {2.11620402,2.7201426}, {2.91897964,1.15138781}, {6,3
}}}, | 188 {{{1.71985495,3.49467373}, {2.11620402,2.7201426}, {2.91897964,1.15138781}, {6,3
}}}, |
174 | 189 |
175 {{{0,1}, {0.392703831,1.78540766}, {0.219947904,2.05676103}, {0.218561709,2.0563
0541}}}, | 190 {{{0,1}, {0.392703831,1.78540766}, {0.219947904,2.05676103}, {0.218561709,2.0563
0541}}}, |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 } | 688 } |
674 | 689 |
675 DEF_TEST(PathOpsCubicIntersection, reporter) { | 690 DEF_TEST(PathOpsCubicIntersection, reporter) { |
676 oneOffTests(reporter); | 691 oneOffTests(reporter); |
677 cubicIntersectionSelfTest(reporter); | 692 cubicIntersectionSelfTest(reporter); |
678 cubicIntersectionCoinTest(reporter); | 693 cubicIntersectionCoinTest(reporter); |
679 standardTestCases(reporter); | 694 standardTestCases(reporter); |
680 if (false) CubicIntersection_IntersectionFinder(); | 695 if (false) CubicIntersection_IntersectionFinder(); |
681 if (false) CubicIntersection_RandTest(reporter); | 696 if (false) CubicIntersection_RandTest(reporter); |
682 } | 697 } |
OLD | NEW |