Home | History | Annotate | Download | only in tests

Lines Matching refs:line2

77 static void check_results(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2,
81 SkDPoint result2 = line2.ptAtT(ts[1][i]);
84 result2 = line2.ptAtT(ts[1][i ^ 1]);
94 static void testOne(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2) {
96 SkASSERT(ValidLine(line2));
98 int pts = i.intersect(line1, line2);
101 check_results(reporter, line1, line2, i);
102 if (line1[0] == line1[1] || line2[0] == line2[1]) {
109 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left);
110 check_results(reporter, line2, line1, ts);
112 if (line2[0].fY == line2[1].fY) {
113 double left = SkTMin(line2[0].fX, line2[1].fX);
114 double right = SkTMax(line2[0].fX, line2[1].fX);
116 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left);
117 check_results(reporter, line1, line2, ts);
123 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top);
124 check_results(reporter, line2, line1, ts);
126 if (line2[0].fX == line2[1].fX) {
127 double top = SkTMin(line2[0].fY, line2[1].fY);
128 double bottom = SkTMax(line2[0].fY, line2[1].fY);
130 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top);
131 check_results(reporter, line1, line2, ts);
137 const SkDLine& line2) {
139 SkASSERT(ValidLine(line2));
141 int pts = ts.intersect(line1, line2);
144 check_results(reporter, line1, line2, ts);
145 if (line1[0] == line1[1] || line2[0] == line2[1]) {
152 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left);
155 check_results(reporter, line2, line1, ts);
157 if (line2[0].fY == line2[1].fY) {
158 double left = SkTMin(line2[0].fX, line2[1].fX);
159 double right = SkTMax(line2[0].fX, line2[1].fX);
161 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left);
164 check_results(reporter, line1, line2, ts);
170 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top);
173 check_results(reporter, line2, line1, ts);
175 if (line2[0].fX == line2[1].fX) {
176 double top = SkTMin(line2[0].fY, line2[1].fY);
177 double bottom = SkTMax(line2[0].fY, line2[1].fY);
179 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top);
182 check_results(reporter, line1, line2, ts);
191 const SkDLine& line2 = coincidentTests[index][1];
192 testOneCoincident(reporter, line1, line2);
196 const SkDLine& line2 = tests[index][1];
197 testOne(reporter, line1, line2);
201 const SkDLine& line2 = noIntersect[index][1];
203 int pts = ts.intersect(line1, line2);
221 const SkDLine& line2 = coincidentTests[index][1];
222 testOneCoincident(reporter, line1, line2);