xref: /csrg-svn/lib/libplot/hp7221/hp7221.h (revision 19980)
115470Sralph /*
2*19980Sdist  * Copyright (c) 1980 Regents of the University of California.
3*19980Sdist  * All rights reserved.  The Berkeley software License Agreement
4*19980Sdist  * specifies the terms and conditions for redistribution.
5*19980Sdist  *
6*19980Sdist  *	@(#)hp7221.h	5.1 (Berkeley) 05/07/85
7*19980Sdist  *
8*19980Sdist  *
915470Sralph  * Displays plot files on an HP7221 plotter.
1015470Sralph  * Cloned from bgplot.c and gigiplot.c by Jim Kleckner
1115470Sralph  * Thu Jun 30 13:35:04 PDT 1983
1215470Sralph  *  Requires a handshaking program such as hp7221cat to get
1315470Sralph  *  the plotter open and ready.
1415470Sralph  */
1515470Sralph 
1615470Sralph #include <stdio.h>
1715470Sralph #include <math.h>
1815470Sralph 
1915470Sralph #define ESC	033
2015470Sralph #define PI	3.141592659
2115470Sralph #define ENDOFSTRING 03
2215470Sralph 
2315470Sralph /* The graphics address range is 0..XMAX, 0..YMAX. */
2415470Sralph #define XMAX	1800
2515470Sralph #define YMAX	1800
2615470Sralph 
2715470Sralph #define scaleX(xi)	((int) ((xi - lowx)*scale +0.5))
2815470Sralph #define scaleY(yi)	((int) ((yi - lowy)*scale +0.5))
2915470Sralph 
3015470Sralph extern int currentx;
3115470Sralph extern int currenty;
3215470Sralph extern double lowx;
3315470Sralph extern double lowy;
3415470Sralph extern double scale;
35