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