xref: /original-bsd/lib/libplot/hp7221/hp7221.h (revision 1cfaf997)
1 /*-
2  * Copyright (c) 1980 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.proprietary.c%
6  *
7  *	@(#)hp7221.h	5.2 (Berkeley) 04/22/91
8  */
9 
10 /*
11  * Displays plot files on an HP7221 plotter.
12  * Cloned from bgplot.c and gigiplot.c by Jim Kleckner
13  * Thu Jun 30 13:35:04 PDT 1983
14  *
15  * Requires a handshaking program such as hp7221cat to get the plotter
16  * open and ready.
17  */
18 
19 #include <stdio.h>
20 #include <math.h>
21 
22 #define ESC	033
23 #define PI	3.141592659
24 #define ENDOFSTRING 03
25 
26 /* The graphics address range is 0..XMAX, 0..YMAX. */
27 #define XMAX	1800
28 #define YMAX	1800
29 
30 #define scaleX(xi)	((int) ((xi - lowx)*scale +0.5))
31 #define scaleY(yi)	((int) ((yi - lowy)*scale +0.5))
32 
33 extern int currentx;
34 extern int currenty;
35 extern double lowx;
36 extern double lowy;
37 extern double scale;
38