-
Notifications
You must be signed in to change notification settings - Fork 6
CleanPolyline
Juju Adams edited this page Mar 22, 2021
·
10 revisions
Returns: Polyline struct
Name | Datatype | Purpose |
---|---|---|
pointArray |
array | Array of x/y coordinate pairs for sequential points on the polyline |
N.B. A shape will only draw when you call the .Draw()
method. Polylines tend not to cope well with very sharp angles and very short distances so be careful about the geometry you're trying to draw.
Polyline 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 line |
alpha |
number | Alpha value of the line |
Returns: self
Name | Datatype | Purpose |
---|---|---|
array |
array | Array of color/alpha pairs corresponding to points on the polyline |
Multi-vertex blending uses triangle-based interpolation and can look ugly with large differences in colour. Use with caution!
Returns: self
Name | Datatype | Purpose |
---|---|---|
pixels |
number | Width of the line |
Returns: self
Name | Datatype | Purpose |
---|---|---|
startType |
string | Cap type for the start of the line, either "none" , "square" , "round" , or "closed"
|
endType |
string | Cap type for the end of the line, either "none" , "square" , "round" , "closed"
|
If either cap type is "closed"
then the polyline will be a closed loop with no caps.
Returns: self
Name | Datatype | Purpose |
---|---|---|
type |
string | Join type, either "none" , "miter" , "bevel" , or "round"
|
@jujuadams 2020