Home | History | Annotate | Download | only in tests

Lines Matching refs:line1

87 static void check_results(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2,
90 SkDPoint result1 = line1.ptAtT(ts[0][i]);
107 static void testOne(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2,
109 SkASSERT(ValidLine(line1));
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]) {
120 if (line1[0].fY == line1[1].fY) {
121 double left = SkTMin(line1[0].fX, line1[1].fX);
122 double right = SkTMax(line1[0].fX, line1[1].fX);
124 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left);
125 check_results(reporter, line2, line1, ts, nearAllowed);
131 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left);
132 check_results(reporter, line1, line2, ts, nearAllowed);
134 if (line1[0].fX == line1[1].fX) {
135 double top = SkTMin(line1[0].fY, line1[1].fY);
136 double bottom = SkTMax(line1[0].fY, line1[1].fY);
138 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top);
139 check_results(reporter, line2, line1, ts, nearAllowed);
145 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top);
146 check_results(reporter, line1, line2, ts, nearAllowed);
151 static void testOneCoincident(skiatest::Reporter* reporter, const SkDLine& line1,
153 SkASSERT(ValidLine(line1));
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]) {
163 if (line1[0].fY == line1[1].fY) {
164 double left = SkTMin(line1[0].fX, line1[1].fX);
165 double right = SkTMax(line1[0].fX, line1[1].fX);
167 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left);
170 check_results(reporter, line2, line1, ts, false);
176 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left);
179 check_results(reporter, line1, line2, ts, false);
181 if (line1[0].fX == line1[1].fX) {
182 double top = SkTMin(line1[0].fY, line1[1].fY);
183 double bottom = SkTMax(line1[0].fY, line1[1].fY);
185 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top);
188 check_results(reporter, line2, line1, ts, false);
194 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top);
197 check_results(reporter, line1, line2, ts, false);
205 const SkDLine& line1 = coincidentTests[index][0];
207 testOneCoincident(reporter, line1, line2);
210 const SkDLine& line1 = tests[index][0];
212 testOne(reporter, line1, line2, true);
215 const SkDLine& line1 = noIntersect[index][0];
218 int pts = ts.intersect(line1, line2);
240 const SkDLine& line1 = coincidentTests[index][0];
242 testOneCoincident(reporter, line1, line2);