1 /* Hello, Emacs, this is -*-C-*-
2 * $Id: dxy.trm,v 1.14 2006/07/21 02:35:45 sfeam Exp $
6 /* GNUPLOT - dxy.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 * Roland DXY800A plotter
45 * Martin Yii, eln557h@monu3.OZ
46 * Further modified Jan 1990 by Russell Lang, rjl@monu1.cc.monash.oz
48 * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net).
53 * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)
59 register_term(dxy800a)
63 TERM_PUBLIC void DXY_init __PROTO((void));
64 TERM_PUBLIC void DXY_graphics __PROTO((void));
65 TERM_PUBLIC void DXY_text __PROTO((void));
66 TERM_PUBLIC void DXY_linetype __PROTO((int linetype));
67 TERM_PUBLIC void DXY_move __PROTO((unsigned int x, unsigned int y));
68 TERM_PUBLIC void DXY_vector __PROTO((unsigned int x, unsigned int y));
69 TERM_PUBLIC void DXY_put_text __PROTO((unsigned int x, unsigned int y, const char *str));
70 TERM_PUBLIC int DXY_text_angle __PROTO((int ang));
71 TERM_PUBLIC void DXY_reset __PROTO((void));
76 #define DXY_XLAST (DXY_XMAX - 1)
77 #define DXY_YLAST (DXY_XMAX - 1)
79 #define DXY_VCHAR (56) /* double actual height of characters */
80 #define DXY_HCHAR (28) /* actual width including spacing */
83 #endif /* TERM_PROTO */
85 #ifndef TERM_PROTO_ONLY
93 /* No initialisation sequences for DXY 800A */
100 /* HOME, Character size 3 */
101 fputs("H\nS3\n", gpoutfile);
108 /* No sequences needed */
113 DXY_linetype(int linetype)
116 fprintf(gpoutfile, "J%d\n", (linetype + 2) % 8 + 1);
119 /* use dotted line for axis */
120 fputs("L1\nB50\n", gpoutfile);
123 /* use solid line for all others */
124 fputs("L0\n", gpoutfile);
131 DXY_move(unsigned int x, unsigned int y)
133 fprintf(gpoutfile, "M%d,%d\n", x, y);
138 DXY_vector(unsigned int x, unsigned int y)
140 fprintf(gpoutfile, "D%d,%d\n", x, y);
145 DXY_put_text(unsigned int x, unsigned int y, const char *str)
147 if (dxy_angle == 1) {
149 DXY_move(x + DXY_VCHAR / 4, y);
152 DXY_move(x, y - DXY_VCHAR / 4);
154 fprintf(gpoutfile, "P%s\n", str);
159 DXY_text_angle(int ang)
161 dxy_angle = (ang ? 1 : 0);
162 fprintf(gpoutfile, "Q%d\n", ang);
171 fputs("H\n", gpoutfile);
174 #endif /* TERM_BODY */
177 TERM_TABLE_START(dxy_driver)
178 "dxy800a", "Roland DXY800A plotter",
179 DXY_XMAX, DXY_YMAX, DXY_VCHAR, DXY_HCHAR,
180 DXY_VTIC, DXY_HTIC, options_null, DXY_init, DXY_reset,
181 DXY_text, null_scale, DXY_graphics, DXY_move, DXY_vector,
182 DXY_linetype, DXY_put_text, DXY_text_angle,
183 null_justify_text, do_point, do_arrow, set_font_null
184 TERM_TABLE_END(dxy_driver)
187 #define LAST_TERM dxy_driver
189 #endif /* TERM_TABLE */
190 #endif /* TERM_PROTO_ONLY */
195 "?commands set terminal dxy800a",
196 "?set terminal dxy800a",
201 " This terminal driver supports the Roland DXY800A plotter. It has no options."