Version 2.0 15 Jan-90
CALL PN the PEN commands
There are 9 commands that control pens. Each graphics port has its own pen. This pen has several attributes that determine how it will behave. Any drawing, be it a line, rectangle, oval, text or whatever is done with a pen. For example let's say that you want to draw a framed rectangle using pattern number 7 and have the vertical lines of the rectangle 2 pixels wide and the horizontal 1 pixel high:
First set the pen size to 1 x 2:
Now make the pen visible ... (able to draw)
And draw the framed rectangle:
This pen will keep these attributes until you change them to something else. If you draw to another graphics port then the attributes of that ports pen will be active which mayor may not have the same attributes as the previous ports pen.
All pens start up with defaults of pen size = 1 x 1 and pen mode = copy.
Pens have so many commands because they are at the heart of all graphic goings on in the toolbox and many variations are needed to create the effects seen in a IIgs application. The pen can draw in anyone of 8 different modes as shown in Figure 2.11. It is best to experiment with the different modes to get a feel for how they work.
Horizontal pen position in global coordinates.
Vertical pen position in global coordinates.
A number 0-15 that selects the solid color to use.
A number 0-15 that selects the pattern to use.
Width of pen in pixels.
Height of pen in pixels.
a number 0-7 that selects the pen mode (see Figure 2.11).
a ProDOS pathname of the pattern to load.
Figure 2.11 Pen modes