fromPoints

fun fromPoints(points: List<Vector2>, closed: Boolean, polarity: YPolarity = YPolarity.CW_NEGATIVE_Y): ShapeContour(source)

Creates a ShapeContour from a list of points, specifying whether the contour is closed and its y-axis polarity.

Return

A ShapeContour object representing the resulting contour.

Parameters

points

A list of points (Vector2) defining the vertices of the contour.

closed

Boolean indicating whether the contour should be closed (forms a loop).

polarity

The y-axis polarity for the contour, default is YPolarity.CW_NEGATIVE_Y.