Annotation of researchv10no/cmd/ideal/idfilt/pout.c, revision 1.1

1.1     ! root        1: #include "idfilt.h"
        !             2: 
        !             3: float xscale, yscale;
        !             4: 
        !             5: boolean wanterase = TRUE;
        !             6: 
        !             7: void idjusttext (str)
        !             8: char *str;
        !             9: {
        !            10: }
        !            11: 
        !            12: void idstart ()
        !            13: {
        !            14:        openpl ();
        !            15:        if (wanterase)
        !            16:                erase ();
        !            17: }
        !            18: 
        !            19: void idendbound ()
        !            20: {
        !            21:        if (boundset)
        !            22:                return;
        !            23:        idminx (-6.0);
        !            24:        idmaxy (6.0);
        !            25:        idmaxx (6.0);
        !            26:        idminy (-6.0);
        !            27:        if (!banzai && maxx - minx < 0.01) {
        !            28:                maxx += 1;
        !            29:                minx -= 1;
        !            30:        }
        !            31:        if (!banzai && maxy - miny < 0.01) {
        !            32:                maxy += 1;
        !            33:                miny -= 1;
        !            34:        }
        !            35:        xscale = maxx - minx;
        !            36:        yscale = maxy - miny;
        !            37:        if (!heightset) {
        !            38:                if (xscale < yscale) {
        !            39:                        maxx += (yscale - xscale)/2.0;
        !            40:                        minx -= (yscale - xscale)/2.0;
        !            41:                        xscale = yscale;
        !            42:                } else {
        !            43:                        maxy += (xscale - yscale)/2.0;
        !            44:                        miny -= (xscale - yscale)/2.0;
        !            45:                        yscale = xscale;
        !            46:                }
        !            47:        }
        !            48:        xscale = 3000.0/xscale;
        !            49:        yscale = 3000.0/yscale;
        !            50:        space (round(minx*xscale) - 20, round(miny*yscale) - 20, round(maxx*xscale) + 20, round(maxy*yscale) + 20);
        !            51:        boundset = TRUE;
        !            52: }
        !            53: 
        !            54: void idline (x1, y1, x2, y2)
        !            55: float x1;
        !            56: float y1;
        !            57: float x2;
        !            58: float y2;
        !            59: {
        !            60:        line (
        !            61:                round(x1*xscale),
        !            62:                round(y1*yscale),
        !            63:                round(x2*xscale),
        !            64:                round(y2*yscale)
        !            65:        );
        !            66: }
        !            67: 
        !            68: void idcircle (x0, y0, r)
        !            69: float x0;
        !            70: float y0;
        !            71: float r;
        !            72: {
        !            73:        circle (
        !            74:                round(x0*xscale),
        !            75:                round(y0*yscale),
        !            76:                round(r*xscale)
        !            77:        );
        !            78: }
        !            79: 
        !            80: void idarc (x0, y0, x1, y1, x2, y2, t1, t2, r)
        !            81: float x0;
        !            82: float y0;
        !            83: float x1;
        !            84: float y1;
        !            85: float x2;
        !            86: float y2;
        !            87: float t1;
        !            88: float t2;
        !            89: float r;
        !            90: {
        !            91:        if (r*xscale > 20000.0)
        !            92:                idline (x1, y1, x2, y2);
        !            93:        else
        !            94:                arc (
        !            95:                        round(x0*xscale),
        !            96:                        round(y0*yscale),
        !            97:                        round(x1*xscale),
        !            98:                        round(y1*yscale),
        !            99:                        round(x2*xscale),
        !           100:                        round(y2*yscale)
        !           101:                );
        !           102: }
        !           103: 
        !           104: void idleft (x, y, str)
        !           105: float x;
        !           106: float y;
        !           107: char *str;
        !           108: {
        !           109:        move (
        !           110:                round(x*xscale),
        !           111:                round(y*yscale)
        !           112:        );
        !           113:        label (
        !           114:                ++str
        !           115:        );
        !           116: }
        !           117: 
        !           118: void idcenter (x, y, str)
        !           119: float x;
        !           120: float y;
        !           121: char *str;
        !           122: {
        !           123:        idleft (x, y, str);
        !           124: }
        !           125: 
        !           126: void idright (x, y, str)
        !           127: float x;
        !           128: float y;
        !           129: char *str;
        !           130: {
        !           131:        idleft (x, y, str);
        !           132: }
        !           133: 
        !           134: void idspline ()
        !           135: {
        !           136: }
        !           137: 
        !           138: void idknot ()
        !           139: {
        !           140: }
        !           141: 
        !           142: void idendspline ()
        !           143: {
        !           144: }
        !           145: 
        !           146: void idendE ()
        !           147: {
        !           148:        closepl ();
        !           149: }
        !           150: 
        !           151: void idendF ()
        !           152: {
        !           153:        idendE ();
        !           154: }
        !           155: 
        !           156: void idnoerase ()
        !           157: {
        !           158:        wanterase = FALSE;
        !           159: }
        !           160: 
        !           161: void idyeserase ()
        !           162: {
        !           163:        wanterase = TRUE;
        !           164: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.