Lines Matching full:acc

378 static void drawQuadrant(struct arc_def *def, struct accelerators *acc,
617 struct arc_def *def, struct arc_bound *bounds, struct accelerators *acc) in tailX() argument
630 Hs = acc->h2; in tailX()
631 WH = -acc->h2mw2; in tailX()
634 Hf = acc->h4; in tailX()
640 if (acc->left.valid && boundedLe(K, bounds->left) && in tailX()
643 if (acc->right.valid && boundedLe(K, bounds->right) && in tailX()
737 if (acc->left.valid && boundedLe(K, bounds->left) && in tailX()
740 if (acc->right.valid && boundedLe(K, bounds->right) && in tailX()
2552 tailEllipseY(struct arc_def *def, struct accelerators *acc) in tailEllipseY() argument
2556 acc->tail_y = 0.0; in tailEllipseY()
2561 if (t < acc->h2) in tailEllipseY()
2565 if (t > acc->h2) in tailEllipseY()
2569 t = (CUBED_ROOT_4 * acc->h2 - cbrt(t * t)) / acc->h2mw2; in tailEllipseY()
2571 acc->tail_y = def->h / CUBED_ROOT_2 * sqrt(t); in tailEllipseY()
2580 outerXfromXY(double x, double y, struct arc_def *def, struct accelerators *acc) in outerXfromXY() argument
2582 return x + (x * acc->h2l) / sqrt(x * x * acc->h4 + y * y * acc->w4); in outerXfromXY()
2586 outerYfromXY(double x, double y, struct arc_def *def, struct accelerators *acc) in outerYfromXY() argument
2588 return y + (y * acc->w2l) / sqrt(x * x * acc->h4 + y * y * acc->w4); in outerYfromXY()
2592 innerXfromXY(double x, double y, struct arc_def *def, struct accelerators *acc) in innerXfromXY() argument
2594 return x - (x * acc->h2l) / sqrt(x * x * acc->h4 + y * y * acc->w4); in innerXfromXY()
2598 innerYfromXY(double x, double y, struct arc_def *def, struct accelerators *acc) in innerYfromXY() argument
2600 return y - (y * acc->w2l) / sqrt(x * x * acc->h4 + y * y * acc->w4); in innerYfromXY()
2604 innerYfromY(double y, struct arc_def *def, struct accelerators *acc) in innerYfromY() argument
2608 x = (def->w / def->h) * sqrt(acc->h2 - y * y); in innerYfromY()
2610 return y - (y * acc->w2l) / sqrt(x * x * acc->h4 + y * y * acc->w4); in innerYfromY()
2632 computeAcc(xArc * tarc, int lw, struct arc_def *def, struct accelerators *acc) in computeAcc() argument
2637 acc->h2 = def->h * def->h; in computeAcc()
2638 acc->w2 = def->w * def->w; in computeAcc()
2639 acc->h4 = acc->h2 * acc->h2; in computeAcc()
2640 acc->w4 = acc->w2 * acc->w2; in computeAcc()
2641 acc->h2l = acc->h2 * def->l; in computeAcc()
2642 acc->w2l = acc->w2 * def->l; in computeAcc()
2643 acc->h2mw2 = acc->h2 - acc->w2; in computeAcc()
2644 acc->fromIntX = (tarc->width & 1) ? 0.5 : 0.0; in computeAcc()
2645 acc->fromIntY = (tarc->height & 1) ? 0.5 : 0.0; in computeAcc()
2646 acc->xorg = tarc->x + (tarc->width >> 1); in computeAcc()
2647 acc->yorgu = tarc->y + (tarc->height >> 1); in computeAcc()
2648 acc->yorgl = acc->yorgu + (tarc->height & 1); in computeAcc()
2649 tailEllipseY(def, acc); in computeAcc()
2660 struct accelerators *acc, miArcFacePtr right, miArcFacePtr left) in computeBound() argument
2678 bound->outer.min = outerYfromXY(ellipsex.min, bound->ellipse.min, def, acc); in computeBound()
2679 bound->outer.max = outerYfromXY(ellipsex.max, bound->ellipse.max, def, acc); in computeBound()
2680 bound->inner.min = innerYfromXY(ellipsex.min, bound->ellipse.min, def, acc); in computeBound()
2681 bound->inner.max = innerYfromXY(ellipsex.max, bound->ellipse.max, def, acc); in computeBound()
2683 outerx.min = outerXfromXY(ellipsex.min, bound->ellipse.min, def, acc); in computeBound()
2684 outerx.max = outerXfromXY(ellipsex.max, bound->ellipse.max, def, acc); in computeBound()
2685 innerx.min = innerXfromXY(ellipsex.min, bound->ellipse.min, def, acc); in computeBound()
2686 innerx.max = innerXfromXY(ellipsex.max, bound->ellipse.max, def, acc); in computeBound()
2720 &acc->right); in computeBound()
2722 &acc->left); in computeBound()
2729 tail_y = acc->tail_y; in computeBound()
2734 innerTaily = innerYfromY(tail_y, def, acc); in computeBound()
2739 bound->inneri.min = ICEIL(bound->inner.min - acc->fromIntY); in computeBound()
2740 bound->inneri.max = floor(bound->inner.max - acc->fromIntY); in computeBound()
2741 bound->outeri.min = ICEIL(bound->outer.min - acc->fromIntY); in computeBound()
2742 bound->outeri.max = floor(bound->outer.max - acc->fromIntY); in computeBound()
2797 struct arc_bound *bound, struct accelerators *acc, int left) in hookEllipseY() argument
2801 if (acc->h2mw2 == 0) { in hookEllipseY()
2806 ret = (acc->h4 * scan_y) / (acc->h2mw2); in hookEllipseY()
2821 struct arc_bound *bound, struct accelerators *acc, int left) in hookX() argument
2827 ellipse_y = hookEllipseY(scan_y, bound, acc, left); in hookX()
2833 maxMin = ellipse_y * ellipse_y * ellipse_y * acc->h2mw2 - in hookX()
2834 acc->h2 * scan_y * (3 * ellipse_y * ellipse_y - 2 * acc->h2); in hookX()
2838 x = (acc->h2 * scan_y - ellipse_y * acc->h2mw2) * in hookX()
2839 sqrt(acc->h2 - ellipse_y * ellipse_y) / in hookX()
2846 if (acc->left.valid && boundedLe(scan_y, bound->left)) { in hookX()
2847 x = intersectLine(scan_y, acc->left); in hookX()
2850 if (acc->right.valid) in hookX()
2851 x = intersectLine(scan_y, acc->right); in hookX()
2857 if (acc->right.valid && boundedLe(scan_y, bound->right)) { in hookX()
2858 x = intersectLine(scan_y, acc->right); in hookX()
2861 if (acc->left.valid) in hookX()
2862 x = intersectLine(scan_y, acc->left); in hookX()
2882 struct arc_bound *bounds, struct accelerators *acc, int mask) in arcSpan() argument
2895 x = hookX(y + acc->fromIntY, def, bounds, acc, 1); in arcSpan()
2896 if (acc->right.valid && boundedLe(y + acc->fromIntY, bounds->right)) { in arcSpan()
2897 altx = intersectLine(y + acc->fromIntY, acc->right); in arcSpan()
2901 linx = -ICEIL(acc->fromIntX - x); in arcSpan()
2902 rinx = ICEIL(acc->fromIntX + x); in arcSpan()
2912 x = hookX(y + acc->fromIntY, def, bounds, acc, 0); in arcSpan()
2913 if (acc->left.valid && boundedLe(y + acc->fromIntY, bounds->left)) { in arcSpan()
2915 x = intersectLine(y + acc->fromIntY, acc->left); in arcSpan()
2919 loutx = -ICEIL(acc->fromIntX - x); in arcSpan()
2920 routx = ICEIL(acc->fromIntX + x); in arcSpan()
2924 newFinalSpan(acc->yorgu - y, acc->xorg + rinx, acc->xorg + routx); in arcSpan()
2926 newFinalSpan(acc->yorgl + y, acc->xorg + rinx, acc->xorg + routx); in arcSpan()
2930 newFinalSpan(acc->yorgu - y, acc->xorg - loutx, acc->xorg - linx); in arcSpan()
2932 newFinalSpan(acc->yorgl + y, acc->xorg - loutx, acc->xorg - linx); in arcSpan()
2942 struct arc_bound *bounds, struct accelerators *acc, int mask) in arcSpan0() argument
2947 acc->left.valid && boundedLe(0, bounds->left) && acc->left.b > 0) { in arcSpan0()
2949 if (acc->left.b < x) in arcSpan0()
2950 x = acc->left.b; in arcSpan0()
2951 lw = ICEIL(acc->fromIntX - x) - lx; in arcSpan0()
2953 rx = ICEIL(acc->fromIntX + x); in arcSpan0()
2956 arcSpan(0, lx, lw, rx, rw, def, bounds, acc, mask); in arcSpan0()
2964 struct arc_bound *bounds, struct accelerators *acc, int mask) in tailSpan() argument
2970 arcSpan(y, 0, lw, -rw, rw, def, bounds, acc, mask); in tailSpan()
2972 yy = y + acc->fromIntY; in tailSpan()
2973 x = tailX(yy, def, bounds, acc); in tailSpan()
2974 if (yy == 0.0 && x == -rw - acc->fromIntX) in tailSpan()
2976 if (acc->right.valid && boundedLe(yy, bounds->right)) { in tailSpan()
2979 xalt = intersectLine(yy, acc->right); in tailSpan()
2980 if (xalt >= -rw - acc->fromIntX && xalt <= rx) in tailSpan()
2982 n = ICEIL(acc->fromIntX + lx); in tailSpan()
2985 newFinalSpan(acc->yorgu - y, acc->xorg + n, acc->xorg + lw); in tailSpan()
2987 newFinalSpan(acc->yorgl + y, acc->xorg + n, acc->xorg + lw); in tailSpan()
2989 n = ICEIL(acc->fromIntX + rx); in tailSpan()
2992 newFinalSpan(acc->yorgu - y, acc->xorg - rw, acc->xorg + n); in tailSpan()
2994 newFinalSpan(acc->yorgl + y, acc->xorg - rw, acc->xorg + n); in tailSpan()
2998 ICEIL(acc->fromIntX - x), 0, in tailSpan()
2999 ICEIL(acc->fromIntX + x), 0, def, bounds, acc, mask); in tailSpan()
3264 struct accelerators acc; in drawArc() local
3427 computeAcc(tarc, l, &def, &acc); in drawArc()
3452 drawQuadrant(&def, &acc, sweep[j].a0, sweep[j].a1, mask, in drawArc()
3496 struct accelerators *acc, in drawQuadrant() argument
3510 computeBound(def, &bound, acc, right, left); in drawQuadrant()
3514 miny = ICEIL(yy - acc->fromIntY); in drawQuadrant()
3518 maxy = floor(yy - acc->fromIntY); in drawQuadrant()
3523 newFinalSpan(acc->yorgu - y - 1, acc->xorg, acc->xorg + 1); in drawQuadrant()
3532 def, &bound, acc, mask); in drawQuadrant()
3534 tailSpan(y, -span->rw, -span->rx, def, &bound, acc, mask); in drawQuadrant()
3543 arcSpan(y, 0, 0, 0, 1, def, &bound, acc, mask & 0xc); in drawQuadrant()
3550 def, &bound, acc, mask); in drawQuadrant()
3560 def, &bound, acc, n); in drawQuadrant()
3562 tailSpan(y, -span->rw, -span->rx, def, &bound, acc, n); in drawQuadrant()
3566 def, &bound, acc, n); in drawQuadrant()
3570 yy = y + acc->fromIntY; in drawQuadrant()
3576 x = tailX(yy, def, &bound, acc); in drawQuadrant()
3577 if (acc->left.valid && boundedLe(yy, bound.left)) { in drawQuadrant()
3578 xalt = intersectLine(yy, acc->left); in drawQuadrant()
3582 if (acc->right.valid && boundedLe(yy, bound.right)) { in drawQuadrant()
3583 xalt = intersectLine(yy, acc->right); in drawQuadrant()
3589 ICEIL(acc->fromIntX - x), 0, in drawQuadrant()
3590 ICEIL(acc->fromIntX + x), 0, def, &bound, acc, mask); in drawQuadrant()