1*48519Sbostic /*- 2*48519Sbostic * Copyright (c) 1985 The Regents of the University of California. 3*48519Sbostic * All rights reserved. 4*48519Sbostic * 5*48519Sbostic * %sccs.include.proprietary.c% 624996Ssam */ 724996Ssam 824996Ssam #ifndef lint 9*48519Sbostic static char sccsid[] = "@(#)line.c 5.3 (Berkeley) 04/22/91"; 10*48519Sbostic #endif /* not lint */ 1124996Ssam 1224996Ssam #include "imp.h" 1324996Ssam #include "imPcodes.h" 1424996Ssam float obotx = 0.; 1524996Ssam float oboty = 0.; 1625012Ssam float botx = 2.; 1725012Ssam float boty = 2.; 1824996Ssam float scalex = 1.; 1924996Ssam float scaley = 1.; 2024996Ssam line(x0,y0,x1,y1) 2124996Ssam { 2224996Ssam putch(imP_CREATE_PATH); 2324996Ssam putwd(2); /* two coordinates follow */ 2425012Ssam putwd((int)((x0-obotx)*scalex+botx)); 2525012Ssam putwd((int)((y0-oboty)*scaley+boty)); 2625012Ssam putwd((int)((x1-obotx)*scalex+botx)); 2725012Ssam putwd((int)((y1-oboty)*scaley+boty)); 2824996Ssam putch(imP_DRAW_PATH); 2924996Ssam putch(15); /* "black" lines */ 3024996Ssam imPx = x1; 3124996Ssam imPy = y1; 3224996Ssam } 3324996Ssam putch(c) 3424996Ssam { 3524996Ssam putc(c, stdout); 3624996Ssam } 3724996Ssam putwd(w) 3824996Ssam { 3924996Ssam putch(w>>8); 4024996Ssam putch(w); 4124996Ssam } 42