Annotation of 43BSDReno/lib/libplot/imagen/line.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1985 Regents of the University of California.
                      3:  * All rights reserved.  The Berkeley software License Agreement
                      4:  * specifies the terms and conditions for redistribution.
                      5:  */
                      6: 
                      7: #ifndef lint
                      8: static char sccsid[] = "@(#)line.c     5.2 (Berkeley) 9/21/85";
                      9: #endif not lint
                     10: 
                     11: #include "imp.h"
                     12: #include "imPcodes.h"
                     13: float obotx = 0.;
                     14: float oboty = 0.;
                     15: float botx = 2.;
                     16: float boty = 2.;
                     17: float scalex = 1.;
                     18: float scaley = 1.;
                     19: line(x0,y0,x1,y1)
                     20: {
                     21:        putch(imP_CREATE_PATH);
                     22:        putwd(2);               /* two coordinates follow */
                     23:        putwd((int)((x0-obotx)*scalex+botx));   
                     24:        putwd((int)((y0-oboty)*scaley+boty));   
                     25:        putwd((int)((x1-obotx)*scalex+botx));   
                     26:        putwd((int)((y1-oboty)*scaley+boty));   
                     27:        putch(imP_DRAW_PATH);
                     28:        putch(15);              /* "black" lines */
                     29:        imPx = x1;
                     30:        imPy = y1;
                     31: }
                     32: putch(c)
                     33: {
                     34:        putc(c, stdout);
                     35: }
                     36: putwd(w)
                     37: {
                     38:        putch(w>>8);
                     39:        putch(w);
                     40: }

unix.superglobalmegacorp.com

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