Lines Matching refs:line2
74 static void check_results(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2,
78 SkDPoint result2 = line2.ptAtT(ts[1][i]);
81 result2 = line2.ptAtT(ts[1][i ^ 1]);
88 static void testOne(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2) {
90 SkASSERT(ValidLine(line2));
92 int pts = i.intersect(line1, line2);
95 check_results(reporter, line1, line2, i);
96 if (line1[0] == line1[1] || line2[0] == line2[1]) {
103 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left);
104 check_results(reporter, line2, line1, ts);
106 if (line2[0].fY == line2[1].fY) {
107 double left = SkTMin(line2[0].fX, line2[1].fX);
108 double right = SkTMax(line2[0].fX, line2[1].fX);
110 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left);
111 check_results(reporter, line1, line2, ts);
117 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top);
118 check_results(reporter, line2, line1, ts);
120 if (line2[0].fX == line2[1].fX) {
121 double top = SkTMin(line2[0].fY, line2[1].fY);
122 double bottom = SkTMax(line2[0].fY, line2[1].fY);
124 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top);
125 check_results(reporter, line1, line2, ts);
131 const SkDLine& line2) {
133 SkASSERT(ValidLine(line2));
135 int pts = ts.intersect(line1, line2);
138 check_results(reporter, line1, line2, ts);
139 if (line1[0] == line1[1] || line2[0] == line2[1]) {
146 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left);
149 check_results(reporter, line2, line1, ts);
151 if (line2[0].fY == line2[1].fY) {
152 double left = SkTMin(line2[0].fX, line2[1].fX);
153 double right = SkTMax(line2[0].fX, line2[1].fX);
155 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left);
158 check_results(reporter, line1, line2, ts);
164 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top);
167 check_results(reporter, line2, line1, ts);
169 if (line2[0].fX == line2[1].fX) {
170 double top = SkTMin(line2[0].fY, line2[1].fY);
171 double bottom = SkTMax(line2[0].fY, line2[1].fY);
173 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top);
176 check_results(reporter, line1, line2, ts);
185 const SkDLine& line2 = coincidentTests[index][1];
186 testOneCoincident(reporter, line1, line2);
190 const SkDLine& line2 = tests[index][1];
191 testOne(reporter, line1, line2);
195 const SkDLine& line2 = noIntersect[index][1];
197 int pts = ts.intersect(line1, line2);
215 const SkDLine& line2 = coincidentTests[index][1];
216 testOneCoincident(reporter, line1, line2);