Skip to content

CleanTriangle

Juju Adams edited this page Apr 8, 2021 · 10 revisions

 

CleanTriangle(x1, y1, x2, y2, x3, y3)

Returns: Triangle struct

Name Datatype Purpose
x1 number x-coordinate of the first corner
y1 number y-coordinate of the first corner
x2 number x-coordinate of the second corner
y2 number y-coordinate of the second corner
x3 number x-coordinate of the third corner
y3 number y-coordinate of the third corner

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

 

Triangle 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

 

.Blend3(color1, alpha1, color2, alpha2, color3, alpha3)

Returns: self

Name Datatype Purpose
color1 24-bit color Color at the first corner
alpha1 number Alpha at the first corner
color2 24-bit color Color at the second corner
alpha2 number Alpha at the second corner
color3 24-bit color Color at the third corner
alpha3 number Alpha at the third corner

 

.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

 

.Border3(thickness, color1, alpha1, color2, alpha2, color3, alpha3)

Returns: self

Name Datatype Purpose
thickness number Width of the border, in pixels
color1 24-bit color Border color at the first corner
alpha1 number Border alpha at the first corner
color2 24-bit color Border color at the second corner
alpha2 number Border alpha at the second corner
color3 24-bit color Border color at the third corner
alpha3 number Border alpha at the third corner

 

.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