PointsToPenWidth() 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 width for a given point size. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

PointsToPenWidth( pointsize )

pointsize is a float value in tenths of a point.

Return Value

SmallInt

Description

The PointsToPenWidth() function takes a value in tenths of a point and converts that into a pen width.

Example

Include "MAPBASIC.DEF"
Dim Width As Integer
Dim p_bus_route As Pen
Width = PointsToPenWidth(1.7)
p_bus_route = MakePen(Width, 9, RED)

See Also:

CurrentPen() function, IsPenWidthPixels() function, MakePen() function, Pen clause, PenWidthToPoints() function, StyleAttr() function