# RECTANGLE

> [HTML Version](rectangle_pd.htm)

**//RECTANGLE, left, top, right, bottom \{,fill \{,crwidth \{,crheight\}\}\}**

RECTANGLE draws a rectangle at the specified coordinates in the current mapping mode (as determined by SETMAPMODE), with optionally rounded corners. 

**Parameters**

_left, top, right, bottom_

specify the respective sides of the rectangle, in the current mapping units

_fill_

select a value for _fill_ from the table below. See the topic [Parameters: Symbols vs. Values](parameterssymbolsvs_values.md) if you have questions about which to use.

| **Symbol** | **Value** | **Description** |
|------|------|------|
| WHITE\_BRUSH | 0 | White |
| LTGRAY\_BRUSH | 1 | Light gray |
| GRAY\_BRUSH | 2 | Gray |
| DKGRAY\_BRUSH | 3 | Dark gray |
| BLACK\_BRUSH | 4 | Black |
| NULL\_BRUSH | 5 | Hollow (default) |




The light gray, gray, and dark gray fill values will be overridden by a brush defined using [SETBRUSH](setbrush_pd.md). 

Regardless of the _fill_ option, a border will be drawn around the rectangle using the current pen (see [SETPENEX](setpenex_pd.md)). To achieve a solid colored rectangle with no apparent border, set the RGB background in both the SETPENEX and SETBRUSH to the same color.

_crwidth, crheight_

These optional parameters refer to the "corner radius" width and height, in the current mapping units. For normal (symmetrical) rounded corners, _crheight_ is not needed, and _crwidth_ should be set to the radius of the circle used to draw the arc of the rounded corner. When _crheight_ is specified, the corners are made from the arc of an ellipse whose total height (bounding rectangle) is two times _crheight_ and whose total width is two times _crwidth_.