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