Skip to content

CleanRectangle

Juju Adams edited this page Mar 30, 2021 · 13 revisions

 

CleanRectangle(left, top, right, bottom)

Returns: Rectangle struct

Name Datatype Purpose
left number x-coordinate of the top-left corner
top number y-coordinate of the top-left corner
right number x-coordinate of the bottom-right corner
bottom number y-coordinate of the bottom-right corner

N.B. A shape will only draw when you call the .Draw() method.

 

Rectangle 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

 

.Blend4(color1, alpha1, color2, alpha2, color3, alpha3, color4, alpha4)

Returns: self

Name Datatype Purpose
color1 24-bit color Color at the top-left corner
alpha1 number Alpha at the top-left corner
color2 24-bit color Color at the top-right corner
alpha2 number Alpha at the top-right corner
color3 24-bit color Color at the bottom-left corner
alpha3 number Alpha at the bottom-left corner
color4 24-bit color Color at the bottom-right corner
alpha4 number Alpha at the bottom-right corner

 

.Rotate(angle)

Returns: self

Name Datatype Purpose
angle number Rotation angle of the rectangle, around its geometric centre, in degrees

 

.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

 

.Border4(thickness, color1, alpha1, color2, alpha2, color3, alpha3, color4, alpha4)

Returns: self

Name Datatype Purpose
thickness number Width of the border, in pixels
color1 24-bit color Color at the top-left corner
alpha1 number Alpha at the top-left corner
color2 24-bit color Color at the top-right corner
alpha2 number Alpha at the top-right corner
color3 24-bit color Color at the bottom-left corner
alpha3 number Alpha at the bottom-left corner
color4 24-bit color Color at the bottom-right corner
alpha4 number Alpha at the bottom-right 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