Skip to content

CleanLine

Juju Adams edited this page Mar 22, 2021 · 8 revisions

 

CleanLine(x1, y1, x2, y2)

Returns: Line struct

Name Datatype Purpose
x1 number Start x-coordinate
y1 number Start y-coordinate
x2 number End x-coordinate
y2 number End y-coordinate

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

 

Lines 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 line
alpha number Alpha value of the line

 

.Blend2(color1, alpha1, color2, alpha2)

Returns: self

Name Datatype Purpose
color1 24-bit color Color of the start of the line
alpha1 number Alpha value of the start of the line
color2 24-bit color Color of the end of the line
alpha2 number Alpha value of the end of the line

 

.Thickness(pixels)

Returns: self

Name Datatype Purpose
pixels number Width of the line

 

.Cap(startType, endType)

Returns: self

Name Datatype Purpose
startType string Cap type for the start of the line, either "none", "square", or "round"
endType string Cap type for the end of the line, either "none", "square", or "round"