1*15470Sralph /* hp7221.h 4.1 83/11/10 */ 2*15470Sralph /* 3*15470Sralph * Displays plot files on an HP7221 plotter. 4*15470Sralph * Cloned from bgplot.c and gigiplot.c by Jim Kleckner 5*15470Sralph * Thu Jun 30 13:35:04 PDT 1983 6*15470Sralph * Requires a handshaking program such as hp7221cat to get 7*15470Sralph * the plotter open and ready. 8*15470Sralph */ 9*15470Sralph 10*15470Sralph #include <stdio.h> 11*15470Sralph #include <math.h> 12*15470Sralph 13*15470Sralph #define ESC 033 14*15470Sralph #define PI 3.141592659 15*15470Sralph #define ENDOFSTRING 03 16*15470Sralph 17*15470Sralph /* The graphics address range is 0..XMAX, 0..YMAX. */ 18*15470Sralph #define XMAX 1800 19*15470Sralph #define YMAX 1800 20*15470Sralph 21*15470Sralph #define scaleX(xi) ((int) ((xi - lowx)*scale +0.5)) 22*15470Sralph #define scaleY(yi) ((int) ((yi - lowy)*scale +0.5)) 23*15470Sralph 24*15470Sralph extern int currentx; 25*15470Sralph extern int currenty; 26*15470Sralph extern double lowx; 27*15470Sralph extern double lowy; 28*15470Sralph extern double scale; 29