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
|
/*
* $Id: hp2648.trm,v 1.12 1997/04/10 02:34:17 drd Exp $
*
*/
/* GNUPLOT - hp2648.trm */
/*
* Copyright (C) 1990 - 1993, 1997
*
* 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:
* HP2648 and HP2647
*
* AUTHORS
* Russell Lang
*
* send your comments or suggestions to (info-gnuplot@dartmouth.edu).
*
*/
/*
* adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)
*/
#ifndef GOT_DRIVER_H
#include "driver.h"
#endif
#ifdef TERM_REGISTER
register_term(hp2648)
#endif
#ifdef TERM_PROTO
TERM_PUBLIC void HP2648init __PROTO((void));
TERM_PUBLIC void HP2648graphics __PROTO((void));
TERM_PUBLIC void HP2648text __PROTO((void));
TERM_PUBLIC void HP2648linetype __PROTO((int linetype));
TERM_PUBLIC void HP2648move __PROTO((unsigned int x, unsigned int y));
TERM_PUBLIC void HP2648vector __PROTO((unsigned int x, unsigned int y));
TERM_PUBLIC void HP2648put_text __PROTO((unsigned int x, unsigned int y, char *str));
TERM_PUBLIC int HP2648_text_angle __PROTO((int ang));
TERM_PUBLIC void HP2648reset __PROTO((void));
#define HP2648XMAX 720
#define HP2648YMAX 360
#define HP2648VCHAR 12
#define HP2648HCHAR 7
#define HP2648VTIC 8
#define HP2648HTIC 8
#endif /* TERM_PROTO */
#ifndef TERM_PROTO_ONLY
#ifdef TERM_BODY
#define HP2648XLAST (HP2648XMAX - 1)
#define HP2648YLAST (HP2648YMAX - 1)
TERM_PUBLIC void HP2648init()
{
fprintf(outfile,"\033*m1m1n136,1cZ");
/* 1 2 3 4
1. mode
2. textsize=1
3. textangle=1
4. define line type 2 to be * * * * etc.
*/
}
TERM_PUBLIC void HP2648graphics()
{
fprintf(outfile,"\033*dacZ");
/* 1 23
1. mode
2. clear grahics screen
3. graphics video on
*/
}
TERM_PUBLIC void HP2648text()
{
}
TERM_PUBLIC void HP2648linetype(linetype)
int linetype;
{
static int hpline[] = {1,7,1,4,5,6,8,9,10,7,2};
fprintf(outfile,"\033*m%dbZ",hpline[(linetype+2)%11]);
}
TERM_PUBLIC void HP2648move(x,y)
unsigned int x,y;
{
fprintf(outfile,"\033*paf%d,%dZ",x,y);
/* 1 23 4
1 plot mode
2 "pen up"
3 goto absolute x,y
4 end command
*/
}
TERM_PUBLIC void HP2648vector(x,y)
unsigned int x,y;
{
fprintf(outfile,"\033*pbf%d,%dZ",x,y);
/* 1
1 "pen down"
*/
}
TERM_PUBLIC void HP2648put_text(x,y,str)
unsigned int x, y;
char *str;
{
HP2648move(x,y-HP2648VCHAR/2 + 1);
fprintf(outfile,"\033*l%s\n",str);
}
TERM_PUBLIC int HP2648_text_angle(ang)
int ang;
{
fprintf(outfile,"\033*m%dnZ\n",ang+1);
return TRUE;
}
TERM_PUBLIC void HP2648reset()
{
}
#endif /* TERM_BODY */
#ifdef TERM_TABLE
TERM_TABLE_START(hp2648_driver)
"hp2648", "HP2648 and HP2647",
HP2648XMAX, HP2648YMAX, HP2648VCHAR, HP2648HCHAR,
HP2648VTIC, HP2648HTIC, options_null, HP2648init, HP2648reset,
HP2648text, null_scale, HP2648graphics, HP2648move, HP2648vector,
HP2648linetype, HP2648put_text, HP2648_text_angle,
null_justify_text, line_and_point, do_arrow, set_font_null
TERM_TABLE_END(hp2648_driver)
#undef LAST_TERM
#define LAST_TERM hp2648_driver
#endif /* TERM_TABLE */
#endif /* TERM_PROTO_ONLY */
#ifdef TERM_HELP
START_HELP(hp2648)
"1 hp2648",
"?set terminal hp2648",
"?set term hp2648",
"?terminal hp2648",
"?term hp2648",
"?hp2648",
" The `hp2648` terminal driver supports the Hewlett Packard HP2647 and HP2648.",
" It has no options."
END_HELP(hp2648)
#endif
|