RECT (Draw a rectangle)

The RECT command draws a rectangle on the map. The rectangle will be colour filled if a fill colour is defined in the attribute used.

Command Syntax:

RECT refp,x1,y1,x2,y2,att,style,pitch

Command Parameters: 

refp

Reference point from which to refer the following offsets or -1 or –2

If -1, the rectangle is drawn around the map edges as defined by a MDF file.

If -2, the rectangle is drawn around the valid plotting window. The default is reference point 0.

x1,y1

Bottom left corner of rectangle to draw. No default, unless refp is -1 or -2.

x2,y2

Upper right corner of rectangle. No default unless refp = -1 or-2

att

Attribute to use.

style

Line style

1

Solid (Default).

2

Long dashes.

3

Dotted.

4

Short dashes.

5

Long/short/long dashes.

6

Long/dot/long dash.

If style is negative, smooth line joining is used. The default is solid line, straight line joining (+1).

pitch

Patterned line pitch. The default is 1 cm.

Example
MDFF M1

RECT -1 \ draws a line around the map edges

RECT -2 \ draws a rectangle around the data area

RECT 1,10,10,50,40,rect:k0R,4

This draws three rectangles: one around the map, one around the valid data area as defined in M1.MDF, and a 40 x 30 cm and a red rectangle 10 cm above and right of the map origin.

  • This command is part of the MAPPLOT GX.