Home | History | Annotate | Download | only in tests

Lines Matching refs:line2

55 static void check_results(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2,
59 SkDPoint result2 = line2.ptAtT(ts[1][i]);
62 result2 = line2.ptAtT(ts[1][i ^ 1]);
69 static void testOne(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2) {
71 SkASSERT(ValidLine(line2));
73 int pts = i.intersect(line1, line2);
76 check_results(reporter, line1, line2, i);
77 if (line1[0] == line1[1] || line2[0] == line2[1]) {
84 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left);
85 check_results(reporter, line2, line1, ts);
87 if (line2[0].fY == line2[1].fY) {
88 double left = SkTMin(line2[0].fX, line2[1].fX);
89 double right = SkTMax(line2[0].fX, line2[1].fX);
91 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left);
92 check_results(reporter, line1, line2, ts);
98 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top);
99 check_results(reporter, line2, line1, ts);
101 if (line2[0].fX == line2[1].fX) {
102 double top = SkTMin(line2[0].fY, line2[1].fY);
103 double bottom = SkTMax(line2[0].fY, line2[1].fY);
105 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top);
106 check_results(reporter, line1, line2, ts);
111 const SkDLine& line2) {
113 SkASSERT(ValidLine(line2));
115 int pts2 = ts2.intersect(line1, line2);
118 check_results(reporter, line1, line2, ts2);
121 int pts = ts.intersect(line1, line2);
125 check_results(reporter, line1, line2, ts);
133 const SkDLine& line2 = coincidentTests[index][1];
134 testOneCoincident(reporter, line1, line2);
139 const SkDLine& line2 = tests[index][1];
140 testOne(reporter, line1, line2);
145 const SkDLine& line2 = noIntersect[index][1];
147 int pts = ts.intersect(line1, line2);
158 const SkDLine& line2 = tests[index][1];
159 testOne(reporter, line1, line2);
166 const SkDLine& line2 = coincidentTests[index][1];
167 testOneCoincident(reporter, line1, line2);