Annotation of researchv10no/cmd/view2d/Notes_cv, revision 1.1.1.1

1.1       root        1: ****************
                      2: * frame buffer *     swift  /dev/cv0
                      3: ****************
                      4: 
                      5: coordinate system:
                      6:   lower left of screen = (0,0),  upper right = (511,511)
                      7: 
                      8: cvinit(1);     at start of each program.      0 for warm start.
                      9: 
                     10: cvflush();   flush i/o buffer.
                     11: 
                     12: image(data,x0,y0,x1,y1,bank)  write 8-bit image
                     13:   data   char[x1-x0+1][y1-y0+1]
                     14:     stored as if a Fortran array with d(i,j) at x=i, y=j,
                     15:        (scan rows left to right, starting with bottom row)
                     16:     maximum image size is 128^2.
                     17:   x0,y0,x1,y1  coordinates of lower left and upper right of window
                     18:   bank  3-bit value  (red,green,blue)  indicating banks to be written
                     19: 
                     20: lutrte(bank)  set which bank drives the display
                     21:   bank  0x0   each bank indexes its own color table
                     22:         0x7E  red drives all
                     23:         0x75  green drives all
                     24:         0x53  blue drives all
                     25: 
                     26: cvmap(map,maxi,zero)
                     27:   char *map;   /* string describing kind of map */
                     28:   int maxi;    /* indices from 0 through maxi */
                     29:   int zero;    /* currently unused */
                     30:  map=ffile   read triples from file
                     31:      r       blue-to-red  (for 8 bit in; gamma corrected)
                     32:      s       spectrum     (for 8 bit in; gamma corrected)
                     33:      n       normal map (for 24 bin in; not gamma corrected)
                     34:      g       normal map (for 24 bin in; gamma corrected)
                     35:      i       like g, but inverse video
                     36: 
                     37: cvload(n,x,y);   load coordinate register n.     0<=n<=63
                     38:    creg 4  coordinates of center of screen    (useful for panning)
                     39: zoom(fact)
                     40:   fact = 1, 2, 4, or 8    (to see 512, 256, 128, or 64 -size images)
                     41: 
                     42: cvvalue(r,g,b)    set current color
                     43: 
                     44: cvflood()     erase screen
                     45:  

unix.superglobalmegacorp.com

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