Skip to content

Function: polygonOutline() ​

ts
function polygonOutline(points, cap?): Outline;

Experimental

A simple polygon (flat [x0, y0, x1, y1, …], either orientation) with sharp corners; cap: its triangulation (indices of the polygon's points, e.g. from earcut), default a fan (convex).

Parameters ​

ParameterType
pointsreadonly number[]
cap?readonly number[]

Returns ​

Outline

Released under the MIT License.