Home | History | Annotate | Download | only in tests

Lines Matching refs:line2

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