Home | History | Annotate | Download | only in tests

Lines Matching refs:line1

55 static void check_results(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2,
58 SkDPoint result1 = line1.ptAtT(ts[0][i]);
69 static void testOne(skiatest::Reporter* reporter, const SkDLine& line1, const SkDLine& line2) {
70 SkASSERT(ValidLine(line1));
73 int pts = i.intersect(line1, line2);
76 check_results(reporter, line1, line2, i);
77 if (line1[0] == line1[1] || line2[0] == line2[1]) {
80 if (line1[0].fY == line1[1].fY) {
81 double left = SkTMin(line1[0].fX, line1[1].fX);
82 double right = SkTMax(line1[0].fX, line1[1].fX);
84 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left);
85 check_results(reporter, line2, line1, ts);
91 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left);
92 check_results(reporter, line1, line2, ts);
94 if (line1[0].fX == line1[1].fX) {
95 double top = SkTMin(line1[0].fY, line1[1].fY);
96 double bottom = SkTMax(line1[0].fY, line1[1].fY);
98 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top);
99 check_results(reporter, line2, line1, ts);
105 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top);
106 check_results(reporter, line1, line2, ts);
110 static void testOneCoincident(skiatest::Reporter* reporter, const SkDLine& line1,
112 SkASSERT(ValidLine(line1));
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);
132 const SkDLine& line1 = coincidentTests[index][0];
134 testOneCoincident(reporter, line1, line2);
138 const SkDLine& line1 = tests[index][0];
140 testOne(reporter, line1, line2);
144 const SkDLine& line1 = noIntersect[index][0];
147 int pts = ts.intersect(line1, line2);
157 const SkDLine& line1 = tests[index][0];
159 testOne(reporter, line1, line2);
165 const SkDLine& line1 = coincidentTests[index][0];
167 testOneCoincident(reporter, line1, line2);