148519Sbostic /*- 2*61397Sbostic * Copyright (c) 1985, 1993 3*61397Sbostic * The Regents of the University of California. All rights reserved. 448519Sbostic * 548519Sbostic * %sccs.include.proprietary.c% 624996Ssam */ 724996Ssam 824996Ssam #ifndef lint 9*61397Sbostic static char sccsid[] = "@(#)line.c 8.1 (Berkeley) 06/04/93"; 1048519Sbostic #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.; line(x0,y0,x1,y1)2024996Ssamline(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 } putch(c)3324996Ssamputch(c) 3424996Ssam { 3524996Ssam putc(c, stdout); 3624996Ssam } putwd(w)3724996Ssamputwd(w) 3824996Ssam { 3924996Ssam putch(w>>8); 4024996Ssam putch(w); 4124996Ssam } 42