Purpose
The IsPenWidthPixels function determines if a pen width is in pixels or in points. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
IsPenWidthPixels( penwidth )
penwidth is a small integer representing the pen width.
Return Value
True if the width value is in pixels. False if the width value is in points.
Description
The IsPenWidthPixels() function will return TRUE if the given pen width is in pixels. The pen width for a line may be determined using the StyleAttr() function.
Example
Include "MAPBASIC.DEF"
Dim CurPen As Pen
Dim Width As Integer
Dim PointSize As Float
CurPen = CurrentPen()
Width = StyleAttr(CurPen, PEN_WIDTH)
If Not IsPenWidthPixels(Width) Then
PointSize = PenWidthToPoints(Width)
End If
See Also:
CurrentPen() function, MakePen() function, Pen clause, PenWidthToPoints() function, StyleAttr() function