HTBasic Help
×
Menu
Index

PEN

Sets the line color or physical pen.
 
 PEN pen-number
 
Example:           PEN.BAS
 
Description:
PEN sets the color which will be used for line drawing. The pen can also be changed with PLOT, IPLOT, RPLOT and SYMBOL arguments. See COLOR for a complete explanation of pen-numbers for the CRT.
 
For a plotter, the PEN statement selects one of the available pens. The PEN number is sent to the plotter without any range checking. You should specify only values that are legal on your plotter. Note that for HPGL plotters, a pen number of zero instructs the plotter to put away the pen.
 
Drawing Mode Table
The writing mode of the pen is specified by the current drawing mode and the sign of the pen number. GESCAPECRT,4 is used to change to normal drawing mode. GESCAPE CRT,5 is used to change to alternate drawing mode. The following table defines the different writing modes available. P is a positive pen number, X is the present value of a pixel.
 
Statement
GESCAPE CRT,4
Normal
GESCAPE CRT,5
Alternate
PEN P
P
BINIOR(X,P)
PEN 0
BINCMP(X)*
0
PEN -P
BINAND(X,BINCMP(P))
BINEOR(X,P)
 
*PEN 0 in Normal Drawing Mode will do BINCMP(X) in non-color map mode and 0 in COLOR MAP mode.
 
See Also: