-
Notifications
You must be signed in to change notification settings - Fork 5
CleanNgon
Juju Adams edited this page Mar 22, 2021
·
13 revisions
Returns: N-gon struct
Name | Datatype | Purpose |
---|---|---|
x |
number | x-coordinate of the n-gon's center |
y |
number | y-coordinate of the n-gon's center |
radius |
number | Radius of the n-gon, in pixels |
sides |
integer | Number of sides for the n-gon. Must be 3 or greater |
N-gons are drawn as regular polygons.
N.B. A shape will only draw when you call the .Draw()
method.
N-gon 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 |
---|---|---|
factor |
number | "Star factor", a number between 0.0 and 1.0 that describes the ratio of the outer radius of a star to its inner radius |
Returns: self
Name | Datatype | Purpose |
---|---|---|
angle |
number | Rotation angle of the shape, around its geometric centre, in degrees |
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 |
---|---|---|
radius |
number | Radius of the rounding on corners, in pixels. A value equal to or less than 0 removes all rounding |
@jujuadams 2020