30 #if defined ( PLD_hp7470 ) || defined ( PLD_hp7580 ) || defined ( PLD_lj_hpgl )
39 #if defined ( PLD_hp7470 )
40 "hp7470:HP 7470 Plotter File (HPGL Cartridge, Small Plotter):0:hpgl:34:hp7470\n"
42 #if defined ( PLD_hp7580 )
43 "hp7580:HP 7580 Plotter File (Large Plotter):0:hpgl:35:hp7580\n"
45 #if defined ( PLD_lj_hpgl )
46 "lj_hpgl:HP Laserjet III, HPGL emulation mode:0:hpgl:36:lj_hpgl\n"
51 void plD_line_hpgl(
PLStream *,
short,
short,
short,
short );
52 void plD_polyline_hpgl(
PLStream *,
short *,
short *,
PLINT );
64 #define HP7470_XMAX 10299
66 #define HP7470_YMAX 7649
68 #define HP7580_XMIN -4500
69 #define HP7580_XMAX 4500
70 #define HP7580_YMIN -2790
71 #define HP7580_YMAX 2790
74 #define LJIII_XMAX 11000
75 #define LJIII_YMIN 500
76 #define LJIII_YMAX 7700
78 #define OF pls->OutFile
79 #define MIN_WIDTH 1. // Minimum pen width
80 #define MAX_WIDTH 10. // Maximum pen width
81 #define DEF_WIDTH 1. // Default pen width
84 char *menustr,
char *devnam,
87 #ifndef ENABLE_DYNDRIVERS
110 initialize_hpgl_pls(
PLStream *pls )
114 if ( pls->
width == 0 )
140 hpgl_dispatch_init_helper( pdt,
141 "HP 7470 Plotter File (HPGL Cartridge, Small Plotter)",
154 dev->
xmin = HP7470_XMIN;
155 dev->
xmax = HP7470_XMAX;
156 dev->
ymin = HP7470_YMIN;
157 dev->
ymax = HP7470_YMAX;
159 initialize_hpgl_pls( pls );
161 fputs(
"\x1b.I200;;17:\x1b.N;19:\x1b.M;;;10:IN;\n",
OF );
176 hpgl_dispatch_init_helper( pdt,
177 "HP 7580 Plotter File (Large Plotter)",
"hp7580",
189 dev->
xmin = HP7580_XMIN;
190 dev->
xmax = HP7580_XMAX;
191 dev->
ymin = HP7580_YMIN;
192 dev->
ymax = HP7580_YMAX;
194 initialize_hpgl_pls( pls );
196 fputs(
"\x1b.I200;;17:\x1b.N;19:\x1b.M;;;10:IN;\n",
OF );
197 fputs(
"RO90;IP;SP4;PA;\n",
OF );
208 void plD_init_lj_hpgl(
PLStream * );
212 hpgl_dispatch_init_helper( pdt,
213 "HP Laserjet III, HPGL emulation mode",
"lj_hpgl",
224 dev->
xmin = LJIII_XMIN;
225 dev->
xmax = LJIII_XMAX;
226 dev->
ymin = LJIII_YMIN;
227 dev->
ymax = LJIII_YMAX;
229 initialize_hpgl_pls( pls );
235 fputs(
"\x1b*T300R\x1b%1B;\x1b.I200;;17:\x1b.N;19:\x1b.M;;;10:IN;\n",
OF );
236 fputs(
"RO90;IP;PW 0.2;SP 1;PA;",
OF );
238 #endif // PLD_lj_hpgl
247 plD_line_hpgl(
PLStream *pls,
short x1a,
short y1a,
short x2a,
short y2a )
250 int x1 = x1a, y1 = y1a, x2 = x2a, y2 = y2a;
254 if ( x1 != dev->
xold || y1 != dev->
yold )
255 pls->
bytecnt += fprintf(
OF,
"PU%d %d;", x1, y1 );
259 pls->
bytecnt += fprintf(
OF,
"PD%d %d\n", x2, y2 );
272 plD_polyline_hpgl(
PLStream *pls,
short *xa,
short *ya,
PLINT npts )
279 if ( xa[0] != dev->
xold || ya[0] != dev->
yold )
280 pls->
bytecnt += fprintf(
OF,
"PU%d %d;", xa[0], ya[0] );
284 for ( i = 1; i < npts; i++ )
285 pls->
bytecnt += fprintf(
OF,
"PD%d %d\n", xa[i], ya[i] );
287 dev->
xold = xa[ npts - 1 ];
288 dev->
yold = ya[ npts - 1 ];
317 fputs(
"PG;\n",
OF );
333 fputs(
"SP0\n",
OF );
355 fputs(
"\nInvalid pen selection.", stderr );
357 fprintf(
OF,
"SP%d %d\n", pls->
icol0, width );
384 #endif // PLD_hp7470 || PLD_hp7580 || PLD_lj_hpgl