• Home
  • Raw
  • Download

Lines Matching refs:quad1

127 static bool checkParallel(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2)…  in checkParallel()  argument
129 setQuadHullSweep(quad1, sweep); in checkParallel()
147 double mFactor = fabs(useS ? distEndRatio(sDist, quad1) : distEndRatio(tDist, quad2)); in checkParallel()
151 SkDVector m0 = quad1.ptAtT(0.5) - quad1[0]; in checkParallel()
161 static int quadHullsOverlap(skiatest::Reporter* reporter, const SkDQuad& quad1, in quadHullsOverlap() argument
164 setQuadHullSweep(quad1, sweep); in quadHullsOverlap()
195 SkDVector m0 = quad1.ptAtT(0.5) - quad1[0]; in quadHullsOverlap()
205 return checkParallel(reporter, quad1, quad2); in quadHullsOverlap()
226 static bool orderTRange(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2, in orderTRange() argument
229 orderQuads(reporter, quad1, r, &t1Array); in orderTRange()
238 double a1 = quadAngle(reporter,quad1, t1); in orderTRange()
283 static bool bruteMinT(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2, in bruteMinT() argument
285 double maxRadius = SkTMin(maxDist(quad1), maxDist(quad2)); in bruteMinT()
286 double maxQuads = SkTMax(maxQuad(quad1), maxQuad(quad2)); in bruteMinT()
298 bool stepUp = orderTRange(reporter, quad1, quad2, r, &tRange); in bruteMinT()
300 SkDPoint pt1 = quad1.ptAtT(tRange.t1); in bruteMinT()
343 bool success = orderTRange(reporter, quad1, quad2, r, &tRange); in bruteMinT()
356 SkDPoint pt1 = quad1.ptAtT(tRange.t1); in bruteMinT()
389 static void bruteForce(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2, in bruteForce() argument
395 bool result = bruteMinT(reporter, quad1, quad2, &lowerRange, &upperRange); in bruteForce()
401 static bool bruteForceCheck(skiatest::Reporter* reporter, const SkDQuad& quad1, in bruteForceCheck() argument
404 bool result = bruteMinT(reporter, quad1, quad2, &lowerRange, &upperRange); in bruteForceCheck()
417 static void testQuadAngles(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2, in testQuadAngles() argument
424 makeSegment(&contour, quad1, shortQuads[0], allocator); in testQuadAngles()
425 makeSegment(&contour, quad1, shortQuads[1], allocator); in testQuadAngles()
432 const SkDPoint& origin = quad1[0]; in testQuadAngles()
434 double a1s = atan2(origin.fY - quad1[1].fY, quad1[1].fX - origin.fX); in testQuadAngles()
435 double a1e = atan2(origin.fY - quad1[2].fY, quad1[2].fX - origin.fX); in testQuadAngles()
441 int overlap = quadHullsOverlap(reporter, quad1, quad2); in testQuadAngles()
447 DumpQ(quad1, quad2, testNo); in testQuadAngles()
451 … overlap = quadHullsOverlap(reporter, quad1, quad2); // set a breakpoint and debug if assert fires in testQuadAngles()
454 SkDVector v1s = quad1[1] - quad1[0]; in testQuadAngles()
455 SkDVector v1e = quad1[2] - quad1[0]; in testQuadAngles()
470 bruteForce(reporter, quad1, quad2, overlap > 0); in testQuadAngles()
473 SkDLine rays[] = {{{origin, quad2[2]}}, {{origin, quad1[2]}}}; in testQuadAngles()
474 const SkDQuad* quads[] = {&quad1, &quad2}; in testQuadAngles()
545 firstInside = checkParallel(reporter, quad1, quad2); in testQuadAngles()
553 bruteForce(reporter, quad1, quad2, firstInside); in testQuadAngles()
577 SkDQuad quad1 = {{origin, {ran.nextRangeF(-1000, 1000), ran.nextRangeF(-1000, 1000)}, in DEF_TEST() local
579 if (quad1[0] == quad1[2]) { in DEF_TEST()
588 i.intersect(quad1, quad2); in DEF_TEST()
593 testQuadAngles(reporter, quad1, quad2, index, &allocator); in DEF_TEST()
607 SkDQuad quad1 = {{origin, {ran.nextRangeF(-1000, 1000), ran.nextRangeF(-1000, 1000)}, in DEF_TEST() local
609 if (quad1[0] == quad1[2]) { in DEF_TEST()
618 i.intersect(quad1, quad2); in DEF_TEST()
624 bool result = bruteMinT(reporter, quad1, quad2, &lowerRange, &upperRange); in DEF_TEST()
628 small[0] = quad1; in DEF_TEST()
797 const SkDQuad& quad1 = extremeTests[index][0]; in DEF_TEST() local
802 REPORTER_ASSERT(reporter, quad1[0] == quad2[0]); in DEF_TEST()
804 i.intersect(quad1, quad2); in DEF_TEST()
806 REPORTER_ASSERT(reporter, i.pt(0) == quad1[0]); in DEF_TEST()
807 int overlap = quadHullsOverlap(reporter, quad1, quad2); in DEF_TEST()
810 setQuadHullSweep(quad1, sweep); in DEF_TEST()
815 bool agrees = bruteForceCheck(reporter, quad1, quad2, ccw); in DEF_TEST()
816 maxR = SkTMin(maxR, mDistance(reporter, agrees, quad1, quad2)); in DEF_TEST()
820 midPointAgrees(reporter, quad1, quad2, !ccw); in DEF_TEST()
821 SkDQuad q1 = quad1; in DEF_TEST()
827 q1[1].fX = quad1[0].fX * (1 - hiPass) + quad1[1].fX * hiPass; in DEF_TEST()
828 q1[1].fY = quad1[0].fY * (1 - hiPass) + quad1[1].fY * hiPass; in DEF_TEST()
836 midPointAgrees(reporter, quad1, quad2, !ccw); in DEF_TEST()
844 q1[1].fX = quad1[0].fX * (1 - midTest) + quad1[1].fX * midTest; in DEF_TEST()
845 q1[1].fY = quad1[0].fY * (1 - midTest) + quad1[1].fY * midTest; in DEF_TEST()
851 midPointAgrees(reporter, quad1, quad2, !ccw); in DEF_TEST()