2001/10/02
CHAPTER 4 HP-GL/2 - 34
PW - Pen width
PW [w, [,p]] [;]
w ; width
p ; pen
• This command specifies the width of the pen.
• Pen width can either be specified as a fixed width in millimeters ( the default ) or relative to the distance
between the scaling points P1 and P2.
• If a width of zero is specified the thinnest width possible ( 1 dot wide ) is set.
• Metric widths are scaled by the ratio of the PCL picture frame to the HP-GL/2 plot size. If the ratio for the
two axes is different, the smaller one is used. If this is less than the thinnest width available then a width
of 1 dot is selected.
• If no pen number is specified the new width applies to both pens.
• If a pen number other than 0 or 1 is specified the command is ignored. There are six pens in the
specification.
• If no parameters are specified the pen width defaults to either 0.35mm or 0.1% of the distance from P1 to P2
according to the current width unit setting.
• Pen width settings are not affected by a DF command.
• Pen width does not set the width of the lines that make up the characters in a label.
• A PW command remains in effect until another PW command is issued, until a WU command is used or
until the printer is initialized with an IN command.
10 '-Pen Width-
20 WIDTH "LPT1:", 255
30 LPRINT CHR$(27); "E";
40 LPRINT CHR$(27); "%0B";
50 LPRINT "IN;SP1;";
60 LPRINT "PA3500,2500;PW1.5;"
70 LPRINT "PD4500,2800,4500,1800,3500,1500,3500,2500;"
80 LPRINT "PW0.8;PD2300,2900,2300,1900,3500,1500;"
90 LPRINT "PW0.5;PU2300,2900;PD3300,3200,4500,2800;"
100 LPRINT "PW0.25:PU4500,1800;PD3500,2100;"
110 LPRINT CHR$(27); "%0A";
120 LPRINT CHR$(27); "E";
130 END
<Sample 42>
RF - Raster fill definition
RF [ i [, w, h, p [,...]]] [;]
i : index w : width
p: pen number h : height
• This command defines a rectangular pattern which may be used to fill the area.
• i is the index number of the pattern that is to be defined and must be in the range 1-8. 8 patterns can exist
concurrently.
• If used with an index parameter and no others, the pattern is defined as a solid black fill.
• w is the width in pixels of the pattern that is to be defined and must be in the range 1- 255.
• h is the height in pixels of the pattern that is to be defined an must be in the range 1 - 255.
• p stands for a pixel in the defined fill. p = 0 signifies a white pixel, p>0 signifies a black pixel. The number
of pixels specified should equal the number of pixels in the fill pattern (w, h). The parameter defines
successive pixels' colors from left to right, top to bottom. If you do not supply enough pixel parameters
the trailing pixels default to white.
• Use the FT command to select a fill type from those defined with the RF command.
• Omitting parameters sets all raster fill patterns to solid fill.