Skip to content

CleanConvex

Juju Adams edited this page Mar 6, 2023 · 11 revisions

 

CleanConvex(pointArray)

Returns: Convex polygon struct

Name Datatype Purpose
pointArray array Array of x/y coordinates that defines a convex polygon

N.B. A shape will only draw when you call the .Draw() method. Convex polygons must have their coordinates defined in a clockwise order.

 

Convex polygon structs have the following methods:

 

.Draw()

Returns: N/A (undefined)

Name Datatype Purpose
None

 

.Blend(color, alpha)

Returns: self

Name Datatype Purpose
color 24-bit color Color of the shape
alpha number Alpha value of the shape

 

.BlendExt(blendArray)

Returns: self

Name Datatype Purpose
blendArray array Array of color/alpha pairs corresponding to points on the polygon

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

 

.Border(thickness, color, alpha)

Returns: self

Name Datatype Purpose
thickness number Width of the border, in pixels
color 24-bit color Color of the border
alpha number Alpha of the border

 

.BorderExt(thickness, borderArray)

Returns: self

Name Datatype Purpose
thickness number Width of the border, in pixels
borderArray array Array of border color/alpha pairs corresponding to points on the polygon

 

.Rounding(radius)

Returns: self

Name Datatype Purpose
radius number Radius of the rounding on corners, in pixels. A value equal to or less than 0 removes all rounding

Clone this wiki locally