MakePen() 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 Pen value. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

MakePen( width, pattern, color )

width specifies a pen width.

pattern specifies a line pattern; see Pen clause for a listing.

color is the RGB color value; see RGB() function for details.

Return Value

Pen

Description

The MakePen() function returns a Pen value, which defines a line style. The return value can be assigned to a Pen variable, or may be used as a parameter within a statement that takes a Pen setting as a parameter (such as Create Line statement, Create Pline statement, Set Style statement, or Set Map statement).

See Pen clause for more information about Pen settings.

Example

Include "mapbasic.def"
Dim p_bus_route As Pen
p_bus_route = MakePen(3, 9, RED)

See Also:

CurrentPen() function, Pen clause, StyleAttr() function, RGB() function