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

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:
Returns: N/A (undefined)
| Name | Datatype | Purpose |
|---|---|---|
| None |
Returns: self
| Name | Datatype | Purpose |
|---|---|---|
color |
24-bit color | Color of the shape |
alpha |
number | Alpha value of the shape |
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!
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 |
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 |
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 |
@jujuadams 2020