Home | History | Annotate | Download | only in tests

Lines Matching refs:line1

74 static void check_results(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2,
77 SkDPoint result1 = line1.ptAtT(ts[0][i]);
88 static void testOne(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2) {
89 SkASSERT(ValidLine(line1));
92 int pts = i.intersect(line1, line2);
95 check_results(reporter, line1, line2, i);
96 if (line1[0] == line1[1] || line2[0] == line2[1]) {
99 if (line1[0].fY == line1[1].fY) {
100 double left = SkTMin(line1[0].fX, line1[1].fX);
101 double right = SkTMax(line1[0].fX, line1[1].fX);
103 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left);
104 check_results(reporter, line2, line1, ts);
110 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left);
111 check_results(reporter, line1, line2, ts);
113 if (line1[0].fX == line1[1].fX) {
114 double top = SkTMin(line1[0].fY, line1[1].fY);
115 double bottom = SkTMax(line1[0].fY, line1[1].fY);
117 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top);
118 check_results(reporter, line2, line1, ts);
124 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top);
125 check_results(reporter, line1, line2, ts);
130 static void testOneCoincident(skiatest::Reporter* reporter, const SkDLine& line1,
132 SkASSERT(ValidLine(line1));
135 int pts = ts.intersect(line1, line2);
138 check_results(reporter, line1, line2, ts);
139 if (line1[0] == line1[1] || line2[0] == line2[1]) {
142 if (line1[0].fY == line1[1].fY) {
143 double left = SkTMin(line1[0].fX, line1[1].fX);
144 double right = SkTMax(line1[0].fX, line1[1].fX);
146 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left);
149 check_results(reporter, line2, line1, ts);
155 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left);
158 check_results(reporter, line1, line2, ts);
160 if (line1[0].fX == line1[1].fX) {
161 double top = SkTMin(line1[0].fY, line1[1].fY);
162 double bottom = SkTMax(line1[0].fY, line1[1].fY);
164 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top);
167 check_results(reporter, line2, line1, ts);
173 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top);
176 check_results(reporter, line1, line2, ts);
184 const SkDLine& line1 = coincidentTests[index][0];
186 testOneCoincident(reporter, line1, line2);
189 const SkDLine& line1 = tests[index][0];
191 testOne(reporter, line1, line2);
194 const SkDLine& line1 = noIntersect[index][0];
197 int pts = ts.intersect(line1, line2);
214 const SkDLine& line1 = coincidentTests[index][0];
216 testOneCoincident(reporter, line1, line2);