Brush

(Engine-Level Function)

Description: Returns a brush value.
Returns: Numeric
Usage: Steady State only.
Function Groups: Color, Graphics
Related to:

Pen | GUIPie | GUIEllipse

Format: Brush(Foreground, Background, Pattern)
Parameters:  
Foreground

Required. Any numeric expression giving the foreground color of the brush pattern. Any of the following may be used:

  • a palette index color
  • a system color
  • -1 (transparent)
  • an RGB string in the format, "<RRGGBB>"
Background
Required. Any numeric expression giving the background color of the brush pattern. If there is a solid pattern, this parameter is ignored.

Any of the following may be used:

  • a palette index color
  • a system color
  • -1 (transparent)
  • an RGB string in the format, "<RRGGBB>"
Pattern

Required. Any numeric expression giving the hatch Fill Patterns to use.

A 0 is an invisible pattern, and a 1 is a solid pattern. The maximum style value is 25.

Comments:

Brush values are used in layered graphics statements that paint areas (such as GUIPie or GUIEllipse).

This function may not appear in a script.

Example:

  NewStyle = Brush(12 { Red },
                   14 { Yellow },
                   25 { Brick pattern });

The example above creates a brush composed of red bricks outlined in yellow.