• Home
  • Raw
  • Download

Lines Matching refs:line1

87 static void check_results(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2,  in check_results()  argument
90 SkDPoint result1 = line1.ptAtT(ts[0][i]); in check_results()
107 static void testOne(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2, in testOne() argument
109 SkASSERT(ValidLine(line1)); 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()
120 if (line1[0].fY == line1[1].fY) { in testOne()
121 double left = SkTMin(line1[0].fX, line1[1].fX); in testOne()
122 double right = SkTMax(line1[0].fX, line1[1].fX); 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()
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()
134 if (line1[0].fX == line1[1].fX) { in testOne()
135 double top = SkTMin(line1[0].fY, line1[1].fY); in testOne()
136 double bottom = SkTMax(line1[0].fY, line1[1].fY); 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()
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()
151 static void testOneCoincident(skiatest::Reporter* reporter, const SkDLine& line1, in testOneCoincident() argument
153 SkASSERT(ValidLine(line1)); 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()
163 if (line1[0].fY == line1[1].fY) { in testOneCoincident()
164 double left = SkTMin(line1[0].fX, line1[1].fX); in testOneCoincident()
165 double right = SkTMax(line1[0].fX, line1[1].fX); 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()
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()
181 if (line1[0].fX == line1[1].fX) { in testOneCoincident()
182 double top = SkTMin(line1[0].fY, line1[1].fY); in testOneCoincident()
183 double bottom = SkTMax(line1[0].fY, line1[1].fY); 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()
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()
205 const SkDLine& line1 = coincidentTests[index][0]; in DEF_TEST() local
207 testOneCoincident(reporter, line1, line2); in DEF_TEST()
210 const SkDLine& line1 = tests[index][0]; in DEF_TEST() local
212 testOne(reporter, line1, line2, true); in DEF_TEST()
215 const SkDLine& line1 = noIntersect[index][0]; in DEF_TEST() local
218 int pts = ts.intersect(line1, line2); in DEF_TEST()
240 const SkDLine& line1 = coincidentTests[index][0]; in DEF_TEST() local
242 testOneCoincident(reporter, line1, line2); in DEF_TEST()