# SETBRUSH

> [HTML Version](setbrush_pd.htm)

**//SETBRUSH, style, hatch \{, r, g, b\}**

SETBRUSH is similar to [SETPENEX](setpenex_pd.md) except that it selects a brush that is used only to fill in rectangles and ellipses, and only then when you use the fill options light gray, gray, and dark gray. In those cases, the brush defined previously by SETBRUSH will be used instead of the default brush. See the topic [Parameters: Symbols vs. Values](parameterssymbolsvs_values.md) if you have questions about which to use. 

**Parameters**

_style_

| **Symbol** | **Value** | **Description** |
|------|------|------|
| BS\_SOLID | 0 | Solid |
| BS\_NULL | 1 | No brush (negates SETBRUSH) |
| BS\_HATCHED | 2 | Hatched, see below |




_hatch_

If _style_ is set to BS\_HATCHED, then _hatch_ defines the type of hatch pattern used by the brush, from the following table:

| **Symbol** | **Value** | **Description** |
|------|------|------|
| HS\_HORIZONTAL | 0 | Horizontal lines (- - - - -) |
| HS\_VERTICAL | 1 | Vertical lines (| | | | |) |
| HS\_BDIAGONAL | 2 | Diagonal lines (\\ \\ \\ \\ \\) |
| HS\_FDIAGONAL | 3 | Diagonal lines (/ / / / /) |
| HS\_CROSS | 4 | Crosshatch (+ + + + +) |
| HS\_DIAGCROSS | 5 | Diagonal crosshatch (x x x x x) |




_r, g, b_

The _r, g, _and_ b_ parameters are optional, but if specified, must all be specified. See the [SETTEXTCOLOR](settextcolor_pd.md) directive for notes.