/* prototypes for this file are in hp26.trm-proto */ /* GNUPLOT - hp26.trm */ /* * Copyright (C) 1990 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the modified code. Modifications are to be distributed * as patches to released version. * * This software is provided "as is" without express or implied warranty. * * This file is included by ../term.c. * * This terminal driver supports: * HP2623A * * AUTHORS * hplvlch!ch (Chuck Heller) * * send your comments or suggestions to (pixar!info-gnuplot@sun.com). * */ #define HP26_XMAX 512 #define HP26_YMAX 390 #define HP26_XLAST (HP26_XMAX - 1) #define HP26_YLAST (HP26_XMAX - 1) /* Assume a character size of 1, or a 7 x 10 grid. */ #define HP26_VCHAR 10 #define HP26_HCHAR 7 #define HP26_VTIC (HP26_YMAX/70) #define HP26_HTIC (HP26_XMAX/75) int HP26_init(void) { /* The HP2623A needs no initialization. */ } int HP26_graphics(void) { /* Clear and enable the display */ fputs("\033*daZ\033*dcZ", outfile); } int HP26_text(void) { fputs("\033*dT", outfile); /* back to text mode */ } int HP26_linetype(int linetype) { #define SOLID 1 #define LINE4 4 #define LINE5 5 #define LINE6 6 #define LINE8 8 #define DOTS 7 #define LINE9 9 #define LINE10 10 static int map[2+9] = { SOLID, /* border */ SOLID, /* axes */ DOTS, /* plot 0 */ LINE4, /* plot 1 */ LINE5, /* plot 2 */ LINE6, /* plot 3 */ LINE8, /* plot 4 */ LINE9, /* plot 5 */ LINE10, /* plot 6 */ SOLID, /* plot 7 */ SOLID /* plot 8 */ }; if (linetype >= 9) linetype %= 9; fprintf(outfile, "\033*m%dB", map[linetype + 2]); } int HP26_move(int x, int y) { fprintf(outfile, "\033*pa%d, %dZ", x, y); } int HP26_vector(int x, int y) { fprintf(outfile, "\033*pb%d, %dZ", x, y); } int HP26_put_text(int x, int y, char *str) { HP26_move(x, y - HP26_VCHAR/2); fputs("\033*dS", outfile); fprintf(outfile, "\033*m3Q\033*l%s\n", str); fputs("\033*dT", outfile); } int HP26_reset(void) { }