Skip to content

CleanPolyline

Juju Adams edited this page Mar 10, 2021 · 10 revisions

CleanPolyline(pointArray)

Returns: Polyline struct

Argument Name Purpose
0 pointArray Array of x/y coordinate pairs for sequential points on the polyline

N.B. A shape will only draw when you call the .Draw() method. Polylines tend not to cope well with very sharp angles so be careful about the geometry you're trying to draw.

 

Polylines have the following methods:

 

.Draw()

Argument Name Purpose
None

 

.Blend(color, alpha)

Argument Name Purpose
0 color Color of the line
1 alpha Alpha value of the line

 

.BlendExt(blendArray)

Argument Name Purpose
0 blendArray Array of color/alpha pairs corresponding to points on the polyline

Multi-vertex blending uses triangle-based interpolation and can look ugly with large differences in colour. Use with caution!

 

.Thickness(pixels)

Argument Name Purpose
0 pixels Width of the line

 

.Cap(startType, endType)

Argument Name Purpose
0 startType Cap type for the start of the line, either "none", "square", "round", or "closed"
1 endType Cap type for the end of the line, either "none", "square", "round", or "closed"

If either cap type is "closed" then the polyline will be a closed loop with no caps.

 

.Join(type)

Argument Name Purpose
0 type Join type, either "none", "miter", "bevel", or "round"