32 #if defined ( PLD_hp7470 ) || defined ( PLD_hp7580 ) || defined ( PLD_lj_hpgl )
41 #if defined ( PLD_hp7470 )
42 "hp7470:HP 7470 Plotter File (HPGL Cartridge, Small Plotter):0:hpgl:34:hp7470\n"
44 #if defined ( PLD_hp7580 )
45 "hp7580:HP 7580 Plotter File (Large Plotter):0:hpgl:35:hp7580\n"
47 #if defined ( PLD_lj_hpgl )
48 "lj_hpgl:HP Laserjet III, HPGL emulation mode:0:hpgl:36:lj_hpgl\n"
53 void plD_line_hpgl(
PLStream *,
short,
short,
short,
short );
54 void plD_polyline_hpgl(
PLStream *,
short *,
short *,
PLINT );
66 #define HP7470_XMAX 10299
68 #define HP7470_YMAX 7649
70 #define HP7580_XMIN -4500
71 #define HP7580_XMAX 4500
72 #define HP7580_YMIN -2790
73 #define HP7580_YMAX 2790
76 #define LJIII_XMAX 11000
77 #define LJIII_YMIN 500
78 #define LJIII_YMAX 7700
80 #define OF pls->OutFile
81 #define MIN_WIDTH 1 // Minimum pen width
82 #define MAX_WIDTH 10 // Maximum pen width
83 #define DEF_WIDTH 1 // Default pen width
86 char *menustr,
char *devnam,
89 #ifndef ENABLE_DYNDRIVERS
116 if ( pls->
width == 0 )
142 hpgl_dispatch_init_helper( pdt,
143 "HP 7470 Plotter File (HPGL Cartridge, Small Plotter)",
156 dev->
xmin = HP7470_XMIN;
157 dev->
xmax = HP7470_XMAX;
158 dev->
ymin = HP7470_YMIN;
159 dev->
ymax = HP7470_YMAX;
161 initialize_hpgl_pls( pls );
163 fputs(
"\x1b.I200;;17:\x1b.N;19:\x1b.M;;;10:IN;\n",
OF );
178 hpgl_dispatch_init_helper( pdt,
179 "HP 7580 Plotter File (Large Plotter)",
"hp7580",
191 dev->
xmin = HP7580_XMIN;
192 dev->
xmax = HP7580_XMAX;
193 dev->
ymin = HP7580_YMIN;
194 dev->
ymax = HP7580_YMAX;
196 initialize_hpgl_pls( pls );
198 fputs(
"\x1b.I200;;17:\x1b.N;19:\x1b.M;;;10:IN;\n",
OF );
199 fputs(
"RO90;IP;SP4;PA;\n",
OF );
210 void plD_init_lj_hpgl(
PLStream * );
214 hpgl_dispatch_init_helper( pdt,
215 "HP Laserjet III, HPGL emulation mode",
"lj_hpgl",
226 dev->
xmin = LJIII_XMIN;
227 dev->
xmax = LJIII_XMAX;
228 dev->
ymin = LJIII_YMIN;
229 dev->
ymax = LJIII_YMAX;
231 initialize_hpgl_pls( pls );
237 fputs(
"\x1b*T300R\x1b%1B;\x1b.I200;;17:\x1b.N;19:\x1b.M;;;10:IN;\n",
OF );
238 fputs(
"RO90;IP;PW 0.2;SP 1;PA;",
OF );
240 #endif // PLD_lj_hpgl
249 plD_line_hpgl(
PLStream *pls,
short x1a,
short y1a,
short x2a,
short y2a )
252 int x1 = x1a, y1 = y1a, x2 = x2a, y2 = y2a;
256 if ( x1 != dev->
xold || y1 != dev->
yold )
257 pls->
bytecnt += fprintf(
OF,
"PU%d %d;", x1, y1 );
261 pls->
bytecnt += fprintf(
OF,
"PD%d %d\n", x2, y2 );
274 plD_polyline_hpgl(
PLStream *pls,
short *xa,
short *ya,
PLINT npts )
281 if ( xa[0] != dev->
xold || ya[0] != dev->
yold )
282 pls->
bytecnt += fprintf(
OF,
"PU%d %d;", xa[0], ya[0] );
286 for ( i = 1; i < npts; i++ )
287 pls->
bytecnt += fprintf(
OF,
"PD%d %d\n", xa[i], ya[i] );
289 dev->
xold = xa[ npts - 1 ];
290 dev->
yold = ya[ npts - 1 ];
319 fputs(
"PG;\n",
OF );
335 fputs(
"SP0\n",
OF );
357 fputs(
"\nInvalid pen selection.", stderr );
359 fprintf(
OF,
"SP%d %d\n", pls->
icol0, width );
386 #endif // PLD_hp7470 || PLD_hp7580 || PLD_lj_hpgl
void(* plD_line_fp)(struct PLStream_struct *, short, short, short, short)
void(* plD_eop_fp)(struct PLStream_struct *)
void(* plD_state_fp)(struct PLStream_struct *, PLINT)
void(* plD_tidy_fp)(struct PLStream_struct *)
void plOpenFile(PLStream *pls)
void plCloseFile(PLStream *pls)
void plGetFam(PLStream *pls)
void plFamInit(PLStream *pls)
void(* plD_polyline_fp)(struct PLStream_struct *, short *, short *, PLINT)
PLDev * plAllocDev(PLStream *pls)
void(* plD_esc_fp)(struct PLStream_struct *, PLINT, void *)
PLDLLIMPEXP_DRIVER void plD_dispatch_init_hpgl(PLDispatchTable *pdt)
void(* plD_bop_fp)(struct PLStream_struct *)
PLDLLIMPEXP_DRIVER void plD_dispatch_init_hp7470(PLDispatchTable *pdt)
PLDLLIMPEXP_DRIVER void plD_dispatch_init_hp7580(PLDispatchTable *pdt)
void plP_setpxl(PLFLT xpmm, PLFLT ypmm)
#define PLDLLIMPEXP_DRIVER
void plP_setphy(PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax)
plD_polyline_fp pl_polyline
void(* plD_init_fp)(struct PLStream_struct *)