1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
|
/* Hello, Emacs, this is -*-C-*-
* $Id: aed.trm,v 1.14 2006/07/21 02:35:45 sfeam Exp $
*
*/
/* GNUPLOT - aed.trm */
/*[
* Copyright 1990 - 1993, 1998, 2004
*
* 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 complete modified source code. Modifications are to
* be distributed as patches to the released version. Permission to
* distribute binaries produced by compiling modified sources is granted,
* provided you
* 1. distribute the corresponding source modifications from the
* released version in the form of a patch file along with the binaries,
* 2. add special version identification to distinguish your version
* in addition to the base release version number,
* 3. provide your name and address as the primary contact for the
* support of your modified version, and
* 4. retain our contact information in regard to use of the base
* software.
* Permission to distribute the released version of the source code along
* with corresponding source modifications in the form of a patch file is
* granted with same provisions 2 through 4 for binary distributions.
*
* This software is provided "as is" without express or implied warranty
* to the extent permitted by applicable law.
]*/
/*
* This file is included by ../term.c.
*
* This terminal driver supports:
* AED terminals
*
* AUTHORS
* Colin Kelley, Thomas Williams, Russell Lang
*
* send your comments or suggestions to (gnuplot-info@lists.sourceforge.net).
*
*/
/*
* adapted to the new terminal layout by Stefan Bodewig (Dez. 1995)
*/
#include "driver.h"
#ifdef TERM_REGISTER
register_term(aed512)
register_term(aed767)
#endif
#ifdef TERM_PROTO
TERM_PUBLIC void AED_init __PROTO((void));
TERM_PUBLIC void AED_graphics __PROTO((void));
TERM_PUBLIC void AED_text __PROTO((void));
TERM_PUBLIC void AED_linetype __PROTO((int linetype));
TERM_PUBLIC void AED_move __PROTO((unsigned int x, unsigned int y));
TERM_PUBLIC void AED_vector __PROTO((unsigned int x, unsigned int y));
TERM_PUBLIC void AED_put_text __PROTO((unsigned int x, unsigned int y, const char *str));
TERM_PUBLIC void AED_reset __PROTO((void));
#define AED_XMAX 768
#define AED_YMAX 575
#define AED_VCHAR 13
#define AED_HCHAR 8
#define AED_VTIC 8
#define AED_HTIC 7
/* slightly different for AED 512 */
#define AED5_XMAX 512
#endif
#ifndef TERM_PROTO_ONLY
#ifdef TERM_BODY
#define AED_XLAST (AED_XMAX - 1)
#define AED_YLAST (AED_YMAX - 1)
#define AED5_XLAST (AED5_XMAX - 1)
TERM_PUBLIC void
AED_init()
{
fputs("\033SEN3DDDN.SEC.7.SCT.0.1.80.80.90.SBC.0.AAV2.MOV.0.9.CHR.0.FFD", gpoutfile);
/* 2 3 4 5 7 6 1
1. Clear Screen
2. Set Encoding
3. Set Default Color
4. Set Backround Color Table Entry
5. Set Backround Color
6. Move to Bottom Lefthand Corner
7. Anti-Alias Vectors
*/
}
TERM_PUBLIC void
AED_graphics()
{
fputs("\033FFD\033", gpoutfile);
}
TERM_PUBLIC void
AED_text()
{
fputs("\033MOV.0.9.SEC.7.XXX", gpoutfile);
}
TERM_PUBLIC void
AED_linetype(int linetype)
{
static int color[2 + 9] = { 7, 1, 6, 2, 3, 5, 1, 6, 2, 3, 5 };
static int type[2 + 9] = { 85, 85, 255, 255, 255, 255, 255, 85, 85, 85, 85 };
if (linetype <= -3)
return;
if (linetype >= 10)
linetype %= 10;
fprintf(gpoutfile, "\
\033SLS%d.255.\
\033SEC%d.",
type[linetype + 2],
color[linetype + 2]);
}
TERM_PUBLIC void
AED_move(unsigned int x, unsigned int y)
{
fprintf(gpoutfile, "\033MOV%d.%d.", x, y);
}
TERM_PUBLIC void
AED_vector(unsigned int x, unsigned int y)
{
fprintf(gpoutfile, "\033DVA%d.%d.", x, y);
}
TERM_PUBLIC void
AED_put_text(unsigned int x, unsigned int y, const char *str)
{
AED_move(x, y - AED_VCHAR / 2 + 2);
fprintf(gpoutfile, "\033XXX%s\033", str);
}
#define hxt (AED_HTIC/2)
#define hyt (AED_VTIC/2)
TERM_PUBLIC void
AED_reset()
{
fputs("\033SCT0.1.0.0.0.SBC.0.FFD", gpoutfile);
}
#endif /* TERM_BODY */
#ifdef TERM_TABLE
TERM_TABLE_START(aed512_driver)
"aed512", "AED 512 Terminal",
AED5_XMAX, AED_YMAX, AED_VCHAR, AED_HCHAR,
AED_VTIC, AED_HTIC, options_null, AED_init, AED_reset,
AED_text, null_scale, AED_graphics, AED_move, AED_vector,
AED_linetype, AED_put_text, null_text_angle,
null_justify_text, do_point, do_arrow, set_font_null
TERM_TABLE_END(aed512_driver)
#undef LAST_TERM
#define LAST_TERM aed512_driver
TERM_TABLE_START(aed767_driver)
"aed767", "AED 767 Terminal",
AED_XMAX, AED_YMAX, AED_VCHAR, AED_HCHAR,
AED_VTIC, AED_HTIC, options_null, AED_init, AED_reset,
AED_text, null_scale, AED_graphics, AED_move, AED_vector,
AED_linetype, AED_put_text, null_text_angle,
null_justify_text, do_point, do_arrow, set_font_null
TERM_TABLE_END(aed767_driver)
#undef LAST_TERM
#define LAST_TERM aed767_driver
#endif /* TERM_TABLE */
#endif /* TERM_PROTO_ONLY */
#ifdef TERM_HELP
START_HELP(aed767)
"1 aed767",
"?commands set terminal aed767",
"?set terminal aed767",
"?set term aed767",
"?terminal aed767",
"?term aed767",
"?aed767",
"?commands set terminal aed512",
"?set terminal aed512",
"?set term aed512",
"?terminal aed512",
"?term aed512",
"?aed512",
" The `aed512` and `aed767` terminal drivers support AED graphics terminals.",
" The two drivers differ only in their horizontal ranges, which are 512 and",
" 768 pixels, respectively. Their vertical range is 575 pixels. There are",
" no options for these drivers."
END_HELP(aed767)
#endif
|