Purpose
Returns a Symbol value based on a bitmap file. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
MakeCustomSymbol( filename, color, size, customstyle )
filename is a string up to 31 characters long, representing the name of a bitmap file. The file must be in the CustSymb directory inside the user's MapInfo directory.
color is an integer RGB color value; see RGB() function for details.
size is an integer point size, from 1 to 48.
customstyle is an integer code controlling color and background attributes. See table below.
Return Value
Symbol
Description
The MakeCustomSymbol() function returns a Symbol value based on a bitmap file. See Symbol clause for information about other symbol types.
The following table describes how the customstyle argument controls the symbol's style:
customstyle value | Symbol Style |
---|---|
0 | The Show Background, the Apply Color, and the Display at Actual Size settings are off; the symbol appears in its default state at the point size specified by the size parameter. White pixels in the bitmap are displayed as transparent, allowing whatever is behind the symbol to show through. |
1 | The Show Background setting is on; white pixels in the bitmap are opaque. |
2 | The Apply Color setting is on; non-white pixels in the bitmap are replaced with the symbol's color setting. |
3 | Both Show Background and Apply Color are on. |
4 | The Display at Actual Size setting is on; the bitmap image is rendered at its native width and height in pixels. |
5 | The Show Background and Display at Actual Size settings are on. |
7 | The Show Background, the Apply Color, and the Display at Actual Size settings are on. |
Example
Include "mapbasic.def"
Dim sym_marker As Symbol
sym_marker = MakeCustomSymbol("CAR1-64MP", BLUE, 18, 0)
See Also:
CurrentSymbol() function, MakeFontSymbol() function, MakeSymbol() function, StyleAttr() function, Symbol clause