HPGL is used for pen plotters. PS (PostScript) and HPGL with the PCL5 option are used with printers. You can optionally specify the min/max hard clip limits for either a file or device that can’t return P (Plotter) points:
For HPGL:
PLOTTER IS device,"HPGL[;options]",[p1x,p2x,p1y,p2y]
PLOTTER IS "file","HPGL[;options]",[p1x,p2x,p1y,p2y]
For PostScript:
PLOTTER IS device,"PS[;options]",[p1x,p2x,p1y,p2y]
PLOTTER IS "file","PS[;options]",[p1x,p2x,p1y,p2y]
Options (see below) are listed after the semicolon in the driver name within the quotes. Multiple options are separated by commas.
Plotting Area
The points (p1x,p1y) and (p2x,p2y) set the lower left and the upper right corners of a rectangular area of the plot in mm (the hard clip limits) from the lower left corner of the paper. p2x,p2y must be larger than p1x,p1y. The plotter points can't be negative for PS or PCL5. If the plotting area is omitted, it is requested from the plotter. For file output, default values from the table below will be used.
|
Orientation
|
(P1x,P1y) mm
|
(P2x,P2y) mm
|
HPGL
|
Landscape
|
(-393, -252)
|
(393, 252)
|
|
Portrait
|
(-252, -393)
|
(252, 393)
|
PCL5
|
Landscape
|
(0,0)
|
(254, 184)
|
|
Portrait
|
(0,0)
|
(184, 254)
|
PS
|
Landscape
|
(25.4, 25.4)
|
(262.7, 190.5)
|
|
Portrait
|
(25.4, 25.4)
|
(190.5, 262.7)
|
Since most printers cannot print to the edges of the paper, the points specified should include at least 1 cm of margin on each side.
HPGL/PS Options
COLOR specifies a color printer with plotter functions.
GRAY performs grayscale plots for monochrome printers.
INVERT reproduces colors or grayscale as on the computer screen rather than the default mode for printing dark inks on white paper.
PORTRAIT
produces plots in portrait orientation.
HPGL only Options
FILL allows the plotter/device to perform area filling.
HPGL2 supports HPGL2 plotters and activates the FILL option.
PCL5 (must be used with COLOR, GRAY, and INVERT) specifies a PCL5 (built-in plotter emulation ) printer.
PS and PCL5
The following drawing modes can be selected:
GESCAPE CRT,5 sets an alternate drawing mode where the previous black or colored areas show through the white areas of the new plot.
GESCAPE CRT,4 returns the driver to normal drawing mode where what is currently drawn replaces anything previously at a location.
Line Thickness
GESCAPE CRT,104,param sets line thickness (default is 0.35 mm). For example:
INTEGER Param(1:2) ! an array for the command
Param(1) = 10 ! line thickness code
Param(2) = thickness ! desired thickness (in 1/100 GDU’s)
GESCAPE CRT,104,Param(*) ! send thickness
Line Caps and Joins
By default round caps and joins area used to end and connect lines to simulate the round pens used on pen plotters. This can be changed with the following:
INTEGER Param(1:3) ! an array for the command
Param(1) = 12 ! line thickness code
Param(2) = cap ! desired line cap
Param(3) = join ! desired line join
GESCAPE CRT,104,Param(*) ! set cap and join
The values for cap and join can be selected from the following tables.
Cap
|
Meaning
|
Join
|
Meaning
|
1
|
butt cap
|
1
|
mitered join
|
2
|
square cap
|
2
|
mitered, beveled if too long
|
3
|
triangular cap
|
3
|
triangular join
|
4
|
round cap
|
4
|
round join
|
|
|
5
|
beveled join
|
|
|
6
|
no join
|
Page Ejection
Pages are ejected when: a GCLEAR statement is executed, HTBasic is ended, or PLOTTER IS is set to a different device. For example:
PLOTTER IS CRT,"INTERNAL"
Append
To append new plots to a current file use:
PLOTTER IS "file","HPGL";APPEND