Box, PBox Commands

Purpose

Draws a rectangle.

Syntax

Box x1,y1,x2,y2
Box x1,y1 To x2,y2
Box x1,y1, Step w,h

PBox x1,y1,x2,y2
PBox x1,y1 To x2,y2
PBox x1,y1, Step w,h

x1,y1,x2,y2,w,h : single exp

Description

Box x1,y1,x2,y2 and Box x1,y1 To x2,y2 both draw a rectangle with the diagonally opposite corner coordinates at x1,y1 (upper left) and x2,y2 (lower right), while Box x1,y1 Step w,h also draws a rectangle but with top left coordinate x1,y1 and a width of w and height of h.

The width of the line drawn depends on the setting of the DefLine command, while the way a line or box is drawn on the background depends on the setting of the DrawMode and BkColor properties.

The PBox command acts very much the same, except that the boxes drawn are filled with a pattern defined using Deffill.

Example

OpenW 1

Box 10, 10, 100, 100

DefLine 1

Box 110, 10, Step 90, 90

PBox 10, 110, 100, 200

DefFill 5 : DefLine  0

PBox 110, 110, Step 90, 90

See Also

BkColor, DefFill, DefLine, DrawMode, RBox, PRBox, Box3D, PBox3D, PolyLine, PolyFill

{Created by Sjouke Hamstra; Last updated: 22/06/2017 by James Gaite}