1 /* Hello, Emacs, this is -*-C-*-
2 * $Id: v384.trm,v 1.12 2006/07/21 02:35:48 sfeam Exp $
6 /* GNUPLOT - v384.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:
42 * Vectrix 384 - works with tandy color printer as well
45 * roland@moncskermit.OZ (Roland Yap)
47 * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net).
52 * Vectrix 384 driver - works with tandy color printer as well
53 * in reverse printing 8 color mode.
54 * This doesn't work on Vectrix 128 because it redefines the
55 * color table. It can be hacked to work on the 128 by changing
56 * the colours but then it will probably not print best. The color
57 * table is purposely designed so that it will print well
62 * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)
72 TERM_PUBLIC void V384_init __PROTO((void));
73 TERM_PUBLIC void V384_graphics __PROTO((void));
74 TERM_PUBLIC void V384_text __PROTO((void));
75 TERM_PUBLIC void V384_linetype __PROTO((int linetype));
76 TERM_PUBLIC void V384_move __PROTO((unsigned int x, unsigned int y));
77 TERM_PUBLIC void V384_vector __PROTO((unsigned int x, unsigned int y));
78 TERM_PUBLIC void V384_put_text __PROTO((unsigned int x, unsigned int y, const char str[]));
79 TERM_PUBLIC void V384_reset __PROTO((void));
84 #define V384_XLAST (V384_XMAX - 1)
85 #define V384_YLAST (V384_YMAX - 1)
91 #endif /* TERM_PROTO */
93 #ifndef TERM_PROTO_ONLY
99 fprintf(gpoutfile, "%c%c G0 \n\
116 fprintf(gpoutfile, "%c%c E0 RE N 65535\n", 27, 18);
123 fprintf(gpoutfile, "%c%c\n", 27, 17);
128 V384_linetype(int linetype)
137 6 /* yellow */ , /* not a good color so not in use at the moment */
146 fprintf(gpoutfile, "C %d\n", color[linetype]);
151 V384_move(unsigned int x, unsigned int y)
153 fprintf(gpoutfile, "M %d %d\n", x + 20, y);
158 V384_vector(unsigned int x, unsigned int y)
160 fprintf(gpoutfile, "L %d %d\n", x + 20, y);
165 V384_put_text(unsigned int x, unsigned int y, const char str[])
167 V384_move(x, y + V384_VCHAR / 2);
168 fprintf(gpoutfile, "$%s\n", str);
177 #endif /* TERM_BODY */
180 TERM_TABLE_START(vx384_driver)
181 "vx384", "Vectrix 384 and Tandy color printer",
182 V384_XMAX, V384_YMAX, V384_VCHAR, V384_HCHAR,
183 V384_VTIC, V384_HTIC, options_null, V384_init, V384_reset,
184 V384_text, null_scale, V384_graphics, V384_move, V384_vector,
185 V384_linetype, V384_put_text, null_text_angle,
186 null_justify_text, do_point, do_arrow, set_font_null
187 TERM_TABLE_END(vx384_driver)
190 #define LAST_TERM vx384_driver
192 #endif /* TERM_TABLE */
193 #endif /* TERM_PROTO_ONLY */
198 "?commands set terminal vx384",
199 "?set terminal vx384",
204 " The `vx384` terminal driver supports the Vectrix 384 and Tandy color",
205 " printers. It has no options."