Lines Matching refs:line2
87 static void check_results(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2, in check_results() argument
91 SkDPoint result2 = line2.ptAtT(ts[1][i]); in check_results()
97 result2 = line2.ptAtT(ts[1][i ^ 1]); in check_results()
107 static void testOne(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2, in testOne() argument
110 SkASSERT(ValidLine(line2)); in testOne()
113 int pts = i.intersect(line1, line2); in testOne()
116 check_results(reporter, line1, line2, i, nearAllowed); in testOne()
117 if (line1[0] == line1[1] || line2[0] == line2[1]) { in testOne()
124 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left); in testOne()
125 check_results(reporter, line2, line1, ts, nearAllowed); in testOne()
127 if (line2[0].fY == line2[1].fY) { in testOne()
128 double left = SkTMin(line2[0].fX, line2[1].fX); in testOne()
129 double right = SkTMax(line2[0].fX, line2[1].fX); in testOne()
131 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left); in testOne()
132 check_results(reporter, line1, line2, ts, nearAllowed); in testOne()
138 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top); in testOne()
139 check_results(reporter, line2, line1, ts, nearAllowed); in testOne()
141 if (line2[0].fX == line2[1].fX) { in testOne()
142 double top = SkTMin(line2[0].fY, line2[1].fY); in testOne()
143 double bottom = SkTMax(line2[0].fY, line2[1].fY); in testOne()
145 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top); in testOne()
146 check_results(reporter, line1, line2, ts, nearAllowed); in testOne()
152 const SkDLine& line2) { in testOneCoincident() argument
154 SkASSERT(ValidLine(line2)); in testOneCoincident()
156 int pts = ts.intersect(line1, line2); in testOneCoincident()
159 check_results(reporter, line1, line2, ts, false); in testOneCoincident()
160 if (line1[0] == line1[1] || line2[0] == line2[1]) { in testOneCoincident()
167 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left); in testOneCoincident()
170 check_results(reporter, line2, line1, ts, false); in testOneCoincident()
172 if (line2[0].fY == line2[1].fY) { in testOneCoincident()
173 double left = SkTMin(line2[0].fX, line2[1].fX); in testOneCoincident()
174 double right = SkTMax(line2[0].fX, line2[1].fX); in testOneCoincident()
176 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left); in testOneCoincident()
179 check_results(reporter, line1, line2, ts, false); in testOneCoincident()
185 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top); in testOneCoincident()
188 check_results(reporter, line2, line1, ts, false); in testOneCoincident()
190 if (line2[0].fX == line2[1].fX) { in testOneCoincident()
191 double top = SkTMin(line2[0].fY, line2[1].fY); in testOneCoincident()
192 double bottom = SkTMax(line2[0].fY, line2[1].fY); in testOneCoincident()
194 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top); in testOneCoincident()
197 check_results(reporter, line1, line2, ts, false); in testOneCoincident()
206 const SkDLine& line2 = coincidentTests[index][1]; in DEF_TEST() local
207 testOneCoincident(reporter, line1, line2); in DEF_TEST()
211 const SkDLine& line2 = tests[index][1]; in DEF_TEST() local
212 testOne(reporter, line1, line2, true); in DEF_TEST()
216 const SkDLine& line2 = noIntersect[index][1]; in DEF_TEST() local
218 int pts = ts.intersect(line1, line2); in DEF_TEST()
241 const SkDLine& line2 = coincidentTests[index][1]; in DEF_TEST() local
242 testOneCoincident(reporter, line1, line2); in DEF_TEST()