HTBasic Help
×
Menu
Index

RECTANGLE Statement

 
The RECTANGLE statement generates a four sided polygon described by its width and height displacement from the current pen position. The signs of the width and height determine the pen position after the RECTANGLE execution: If the width is positive, the pen position is on the left side of the rectangle. If the width is negative, the pen position is on the right side of the rectangle. If the height is positive, the pen position is in the lower corner of the rectangle and if it is negative, the pen position is in the upper corner. The following example will help clarify the last pen position.
10 MOVE 50,50
20 RECTANGLE 3,5        !Pen at lower left
30 RECTANGLE 3,-5       !Pen at upper left
40 RECTANGLE -3,5       !Pen at lower right
50 RECTANGLE -3,-5      !Pen at upper right
60 END
 
.The POLYGON and RECTANGLE statements may specify the FILL and EDGE options described later in this section. If neither are specified, EDGE is assumed. The POLYLINE statement cannot specify these options.