124996Ssam /* 224996Ssam * Copyright (c) 1985 Regents of the University of California. 324996Ssam * All rights reserved. The Berkeley software License Agreement 424996Ssam * specifies the terms and conditions for redistribution. 524996Ssam */ 624996Ssam 724996Ssam #ifndef lint 8*25012Ssam static char sccsid[] = "@(#)line.c 5.2 (Berkeley) 09/21/85"; 924996Ssam #endif not lint 1024996Ssam 1124996Ssam #include "imp.h" 1224996Ssam #include "imPcodes.h" 1324996Ssam float obotx = 0.; 1424996Ssam float oboty = 0.; 15*25012Ssam float botx = 2.; 16*25012Ssam float boty = 2.; 1724996Ssam float scalex = 1.; 1824996Ssam float scaley = 1.; 1924996Ssam line(x0,y0,x1,y1) 2024996Ssam { 2124996Ssam putch(imP_CREATE_PATH); 2224996Ssam putwd(2); /* two coordinates follow */ 23*25012Ssam putwd((int)((x0-obotx)*scalex+botx)); 24*25012Ssam putwd((int)((y0-oboty)*scaley+boty)); 25*25012Ssam putwd((int)((x1-obotx)*scalex+botx)); 26*25012Ssam putwd((int)((y1-oboty)*scaley+boty)); 2724996Ssam putch(imP_DRAW_PATH); 2824996Ssam putch(15); /* "black" lines */ 2924996Ssam imPx = x1; 3024996Ssam imPy = y1; 3124996Ssam } 3224996Ssam putch(c) 3324996Ssam { 3424996Ssam putc(c, stdout); 3524996Ssam } 3624996Ssam putwd(w) 3724996Ssam { 3824996Ssam putch(w>>8); 3924996Ssam putch(w); 4024996Ssam } 41