This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Draw a series of connected line segments.
Syntax
n = Canvas_PolyLine points [,rgbColor]
Returns
Number
Parameters
Name |
Type |
Optional |
Meaning |
Points |
UDT |
No |
User-defined type that defines the number of vertices and the location of each. See Remarks for more info. |
rgbColor |
Number |
Yes |
RBG starting color |
Remarks
Points is something like the following UDT:
Type PolyPoint
x As Single
y As Single
End Type
Type PolyArray
count As Long
xy(1024) As PolyPoint '---Can be any number of elements from 2 to 1024
End Type
Points is any UDT that must have the following structure:
•the first member is a LONG integer point count
•followed directly by the appropriate number of SINGLE precision floats to specify the actual coordinates
There must be at least two, and no more than 1024 vertices
Restrictions
See also
Examples
Dim pa As PolyArray
'...
pa.count = 4 '---Indicate you need 4 vertex
pa.xy(1).x = x1 '---X1
pa.xy(1).y = y1-150 '---Y1
pa.xy(2).x = x1+150 '---X2
pa.xy(2).y = y1 '---Y2
pa.xy(3).x = x1 '---X3
pa.xy(3).y = y1+150 '---Y3
pa.xy(4).x = x1-150 '---X4
pa.xy(4).y = y1 '---Y4
CANVAS_Polygon pa, RGB(255, 0, 255), RGB(5,128,0), %CANVAS_FillStyle_DiagonalCrossedLines
'... Number of vertex can be any from 2 to 1024