148518Sbostic /*- 2*61395Sbostic * Copyright (c) 1980, 1993 3*61395Sbostic * The Regents of the University of California. All rights reserved. 419980Sdist * 548518Sbostic * %sccs.include.proprietary.c% 619980Sdist * 7*61395Sbostic * @(#)hp7221.h 8.1 (Berkeley) 06/04/93 848518Sbostic */ 948518Sbostic 1048518Sbostic /* 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 1448518Sbostic * 1548518Sbostic * Requires a handshaking program such as hp7221cat to get the plotter 1648518Sbostic * 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