CIGAL Reference Manual, Chapter 2 (Commands): BOX
usage: box [ color v1 v2 width flag ] ; where V1 and V2 are vectors
or: box [ color x1 y1 nx ny width flag ]
BOX draws a rectangle on the graphics display by adding line drawing instructions to the list of graphics vectors. The box is drawn with intensity COLOR (default COLOR is the value of the internal variable LCOLOR).
The size and position of the rectangle is determined by the coordinates of two diagonal corners. These corners can be specified either as two vectors, each of which has its own X, Y, and Z values, or by entering explicit X and Y values for the upper left corner, and NX and NY for the size of the box – in this case Z is set to the current value of the internal variable ZVALUE (see ZVALUE(4)) and NZ is 0. If the coordinates for either corner are missing, then BOX waits for cursor input to specify the missing corner.
The WIDTH parameter specifies the width of the lines to be drawn and can take on values 1 to 15.
The FLAG parameter allows you to select various drawing options: 1 - draw shape in absolute coordinates (ignoring transformation and clipping settings). 2 - don't store vectors in VECS (assumed if FLAG & 1). 4 - store lines or surfaces as individual vectors to facilitate transformations (ignored if FLAG & 3). 8 - paint inside of box. 16 - XOR values rather than replacing them.
The default value for FLAG varies depending on the context in which BOX is called: If called during a SKETCH(2) command then FLAG defaults to 0, other- wise the default value is 2.
box ; waits for you to mark 2 corners with ; the cursor; color is LCOLOR box 14 ; waits for cursor corners; color is 14 box 100 v1 ; waits for cursor for V2; color is 100 box 100 10 20 150 200 ; box from (10,20) to (150,200)
CIRCLE(2), ELLIPSE(2), GETBOX(3), GETXYZ(3), GRAPHICS(1), LINE(2), SKETCH(2), VARIABLES(1), VECS(4), ZVALUE(4)