MakeBrush() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns a Brush value. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

MakeBrush( pattern, forecolor, backcolor)

pattern is an integer value from 1 to 8 or from 12 to 186, dictating a fill pattern. See Brush clause for a listing of the patterns.

forecolor is the integer RGB color value of the foreground of the pattern. See RGB() function for details.

backcolor is the integer RGB color value of the background of the pattern. To make the background transparent, specify -1 as the background color, and specify a pattern of 3 or greater.

Return Value

Brush

Description

The MakeBrush() function returns a Brush value. The return value can be assigned to a Brush variable, or may be used as a parameter within a statement that takes a Brush setting as a parameter (such as Create Ellipse, Set Map, Set Style, or Shade).

See Brush clause for more information about Brush settings.

Example

Include "mapbasic.def"
Dim b_water As Brush
b_water = MakeBrush(64, CYAN, BLUE)

See Also:

Brush clause, CurrentBrush() function, RGB() function, StyleAttr() function