CHAPTER 4 HP-GL/2 - 35
10 '--Raster Fill Definition==
20 WIDTH "LPT1:", 255
30 LPRINT CHR$(27); "E";
40 LPRINT CHR$(27); "%0B";
50 LPRINT "IN;SP1;";
60 LPRINT "PU5,5;PA3500,2500;"
70 LPRINT
"RF2,8,4,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,;"
80 LPRINT "FT11,2;RR4000,800;EP;"
90 LPRINT CHR$(27); "%0A";
100 LPRINT CHR$(27); "E";
110 END
<Sample 43>
SM - Symbol mode
SM
c
[;]
c
; ASCII character or symbol code
The command specifies the symbol to be drawn.
The specified symbol will be drawn at the end of each vector, irrespective of whether the pen is up or
down when the PA, PR, PD, PU or PE instructions are used.
Characters in the character code ranges 33 - 58, 60 - 126 and characters 161 and 254 can be used.
Character code 59 stands for the ';', which is the HP-GL/2 terminator. You cannot use it as a symbol.
The current character size, slant and direction settings affect the way the symbol is drawn.
Omitting the parameter cancels the symbol mode.
On quitting symbol mode the original pen up/down state is restored.
SP - Select pen
SP [
n
] [;]
n
; pen number
The command selects a pen for drawing.
You must use this command before performing any drawing or filling commands.
n
should be either 0 or 1 ( although any other integers will be interpreted as 1.)
If
n
is 0 the white pen is selected. In this case drawing commands will have no effect, unless you are
plotting onto a dark background and transparency mode is off.
If
n
is 1 the black pen is selected and printing can proceed normally. Use SP1 at the start of HP-GL/2
programs.
Invoking the command with no parameter is equivalent to SP0.
SV - Screened vectors
SV [
s
[,
option
_1[,
option
_2]]] [;]
s
: screen type
option_1
and
option_2:
dependent on the screen type
This command selects the type of screening that will be applied to vectors, arcs, circles and edges of
polygons, rectangles and wedges.
The screen type must have the value 0, 1, 2, 21, 22 or 130. 0 = no screen, 1 = shaded fill ( one of eight
gray scales ), 2 = raster fill as defined by the RF command, 21 = a pre-defined PCL cross-hatch pattern and
130 = shaded fill ( one of sixty-four gray scales ).
With screen type 1
option_1
specifies the percentage of shading (0-100):
option_2
is ignored.
With screen type 2
option_1
is used to specify the index number of the fill pattern created using the RF
command.
Option_2
is set to either 0 or 1: 0 means that the fill will appear in the colour of pen number 1,
1 means it should appear in the current pen's colour.