1*48518Sbostic /*- 2*48518Sbostic * Copyright (c) 1980 The Regents of the University of California. 3*48518Sbostic * All rights reserved. 419980Sdist * 5*48518Sbostic * %sccs.include.proprietary.c% 619980Sdist * 7*48518Sbostic * @(#)hp7221.h 5.2 (Berkeley) 04/22/91 8*48518Sbostic */ 9*48518Sbostic 10*48518Sbostic /* 1115470Sralph * Displays plot files on an HP7221 plotter. 1215470Sralph * Cloned from bgplot.c and gigiplot.c by Jim Kleckner 1315470Sralph * Thu Jun 30 13:35:04 PDT 1983 14*48518Sbostic * 15*48518Sbostic * Requires a handshaking program such as hp7221cat to get the plotter 16*48518Sbostic * open and ready. 1715470Sralph */ 1815470Sralph 1915470Sralph #include <stdio.h> 2015470Sralph #include <math.h> 2115470Sralph 2215470Sralph #define ESC 033 2315470Sralph #define PI 3.141592659 2415470Sralph #define ENDOFSTRING 03 2515470Sralph 2615470Sralph /* The graphics address range is 0..XMAX, 0..YMAX. */ 2715470Sralph #define XMAX 1800 2815470Sralph #define YMAX 1800 2915470Sralph 3015470Sralph #define scaleX(xi) ((int) ((xi - lowx)*scale +0.5)) 3115470Sralph #define scaleY(yi) ((int) ((yi - lowy)*scale +0.5)) 3215470Sralph 3315470Sralph extern int currentx; 3415470Sralph extern int currenty; 3515470Sralph extern double lowx; 3615470Sralph extern double lowy; 3715470Sralph extern double scale; 38