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 "PathOpsExtendedTest.h" | 7 #include "PathOpsExtendedTest.h" |
8 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
9 #include "SkIntersections.h" | 9 #include "SkIntersections.h" |
10 #include "SkPathOpsLine.h" | 10 #include "SkPathOpsLine.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 intersections.intersect(quad, line); | 52 intersections.intersect(quad, line); |
53 result = intersections.used(); | 53 result = intersections.used(); |
54 } | 54 } |
55 return result; | 55 return result; |
56 } | 56 } |
57 | 57 |
58 static struct oneLineQuad { | 58 static struct oneLineQuad { |
59 SkDQuad quad; | 59 SkDQuad quad; |
60 SkDLine line; | 60 SkDLine line; |
61 } oneOffs[] = { | 61 } oneOffs[] = { |
| 62 {{{{97.9337616,100}, {88,112.94265}, {88,130}}}, |
| 63 {{{88.919838,120}, {107.058823,120}}}}, |
62 {{{{447.96701049804687, 894.4381103515625}, {448.007080078125, 894.423950195
3125}, | 64 {{{{447.96701049804687, 894.4381103515625}, {448.007080078125, 894.423950195
3125}, |
63 {448.0140380859375, 894.4215087890625}}}, | 65 {448.0140380859375, 894.4215087890625}}}, |
64 {{{490.43548583984375, 879.40740966796875}, {405.59262084960937, 909.435546
875}}}}, | 66 {{{490.43548583984375, 879.40740966796875}, {405.59262084960937, 909.435546
875}}}}, |
65 {{{{142.589081, 102.283646}, {149.821579, 100}, {158, 100}}}, | 67 {{{{142.589081, 102.283646}, {149.821579, 100}, {158, 100}}}, |
66 {{{90, 230}, {160, 60}}}}, | 68 {{{90, 230}, {160, 60}}}}, |
67 {{{{1101, 10}, {1101, 8.3431453704833984}, {1099.828857421875, 7.17119979858
39844}}}, | 69 {{{{1101, 10}, {1101, 8.3431453704833984}, {1099.828857421875, 7.17119979858
39844}}}, |
68 {{{1099.828857421875,7.1711711883544922}, {1099.121337890625,7.878678321
8383789}}}}, | 70 {{{1099.828857421875,7.1711711883544922}, {1099.121337890625,7.878678321
8383789}}}}, |
69 {{{{973, 507}, {973, 508.24264526367187}, {972.12158203125, 509.121612548828
12}}}, | 71 {{{{973, 507}, {973, 508.24264526367187}, {972.12158203125, 509.121612548828
12}}}, |
70 {{{930, 467}, {973, 510}}}}, | 72 {{{930, 467}, {973, 510}}}}, |
71 {{{{369.848602, 145.680267}, {382.360413, 121.298294}, {406.207703, 121.2982
94}}}, | 73 {{{{369.848602, 145.680267}, {382.360413, 121.298294}, {406.207703, 121.2982
94}}}, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 142 } |
141 if (!t1.approximatelyEqual(lineQuadTests[index].expected[0]) | 143 if (!t1.approximatelyEqual(lineQuadTests[index].expected[0]) |
142 && (lineQuadTests[index].result == 1 | 144 && (lineQuadTests[index].result == 1 |
143 || !t1.approximatelyEqual(lineQuadTests[index].expected[1]))
) { | 145 || !t1.approximatelyEqual(lineQuadTests[index].expected[1]))
) { |
144 SkDebugf("%s t1=(%1.9g,%1.9g)\n", __FUNCTION__, t1.fX, t1.fY); | 146 SkDebugf("%s t1=(%1.9g,%1.9g)\n", __FUNCTION__, t1.fX, t1.fY); |
145 REPORTER_ASSERT(reporter, 0); | 147 REPORTER_ASSERT(reporter, 0); |
146 } | 148 } |
147 } | 149 } |
148 } | 150 } |
149 } | 151 } |
OLD | NEW |