1 /* Hello, Emacs, this is -*-C-*-
2 * $Id: hp2648.trm,v 1.13 2006/07/21 02:35:47 sfeam Exp $
6 /* GNUPLOT - hp2648.trm */
9 * Copyright 1990 - 1993, 1998, 2004
11 * Permission to use, copy, and distribute this software and its
12 * documentation for any purpose with or without fee is hereby granted,
13 * provided that the above copyright notice appear in all copies and
14 * that both that copyright notice and this permission notice appear
15 * in supporting documentation.
17 * Permission to modify the software is granted, but not the right to
18 * distribute the complete modified source code. Modifications are to
19 * be distributed as patches to the released version. Permission to
20 * distribute binaries produced by compiling modified sources is granted,
22 * 1. distribute the corresponding source modifications from the
23 * released version in the form of a patch file along with the binaries,
24 * 2. add special version identification to distinguish your version
25 * in addition to the base release version number,
26 * 3. provide your name and address as the primary contact for the
27 * support of your modified version, and
28 * 4. retain our contact information in regard to use of the base
30 * Permission to distribute the released version of the source code along
31 * with corresponding source modifications in the form of a patch file is
32 * granted with same provisions 2 through 4 for binary distributions.
34 * This software is provided "as is" without express or implied warranty
35 * to the extent permitted by applicable law.
39 * This file is included by ../term.c.
41 * This terminal driver supports:
47 * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net).
52 * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)
62 TERM_PUBLIC void HP2648init __PROTO((void));
63 TERM_PUBLIC void HP2648graphics __PROTO((void));
64 TERM_PUBLIC void HP2648text __PROTO((void));
65 TERM_PUBLIC void HP2648linetype __PROTO((int linetype));
66 TERM_PUBLIC void HP2648move __PROTO((unsigned int x, unsigned int y));
67 TERM_PUBLIC void HP2648vector __PROTO((unsigned int x, unsigned int y));
68 TERM_PUBLIC void HP2648put_text __PROTO((unsigned int x, unsigned int y, const char *str));
69 TERM_PUBLIC int HP2648_text_angle __PROTO((int ang));
70 TERM_PUBLIC void HP2648reset __PROTO((void));
72 #define HP2648XMAX 720
73 #define HP2648YMAX 360
75 #define HP2648VCHAR 12
79 #endif /* TERM_PROTO */
81 #ifndef TERM_PROTO_ONLY
83 #define HP2648XLAST (HP2648XMAX - 1)
84 #define HP2648YLAST (HP2648YMAX - 1)
90 fprintf(gpoutfile, "\033*m1m1n136,1cZ");
95 4. define line type 2 to be * * * * etc.
103 fprintf(gpoutfile, "\033*dacZ");
106 2. clear grahics screen
119 HP2648linetype(int linetype)
121 static int hpline[] = { 1, 7, 1, 4, 5, 6, 8, 9, 10, 7, 2 };
122 fprintf(gpoutfile, "\033*m%dbZ", hpline[(linetype + 2) % 11]);
127 HP2648move(unsigned int x, unsigned int y)
129 fprintf(gpoutfile, "\033*paf%d,%dZ", x, y);
140 HP2648vector(unsigned int x, unsigned int y)
142 fprintf(gpoutfile, "\033*pbf%d,%dZ", x, y);
150 HP2648put_text(unsigned int x, unsigned int y, const char *str)
152 HP2648move(x, y - HP2648VCHAR / 2 + 1);
153 fprintf(gpoutfile, "\033*l%s\n", str);
158 HP2648_text_angle(int ang)
160 int hp_ang = (ang ? 1 : 0);
162 fprintf(gpoutfile, "\033*m%dnZ\n", hp_ang+1);
171 #endif /* TERM_BODY */
174 TERM_TABLE_START(hp2648_driver)
175 "hp2648", "HP2648 and HP2647",
176 HP2648XMAX, HP2648YMAX, HP2648VCHAR, HP2648HCHAR,
177 HP2648VTIC, HP2648HTIC, options_null, HP2648init, HP2648reset,
178 HP2648text, null_scale, HP2648graphics, HP2648move, HP2648vector,
179 HP2648linetype, HP2648put_text, HP2648_text_angle,
180 null_justify_text, line_and_point, do_arrow, set_font_null
181 TERM_TABLE_END(hp2648_driver)
184 #define LAST_TERM hp2648_driver
186 #endif /* TERM_TABLE */
187 #endif /* TERM_PROTO_ONLY */
192 "?commands set terminal hp2648",
193 "?set terminal hp2648",
198 " The `hp2648` terminal driver supports the Hewlett Packard HP2647 and HP2648.",
199 " It has no options."