Commit | Line | Data |
---|---|---|
8be7f0f9 SL |
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 | |
82d16e90 | 8 | static char sccsid[] = "@(#)line.c 5.2 (Berkeley) %G%"; |
8be7f0f9 SL |
9 | #endif not lint |
10 | ||
11 | #include "imp.h" | |
12 | #include "imPcodes.h" | |
8be7f0f9 SL |
13 | float obotx = 0.; |
14 | float oboty = 0.; | |
82d16e90 SL |
15 | float botx = 2.; |
16 | float boty = 2.; | |
8be7f0f9 SL |
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 */ | |
82d16e90 SL |
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)); | |
8be7f0f9 SL |
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 | } |