addPoly

fun addPoly(pts: Array<Point>, close: Boolean): Path

Adds contour created from line array, adding (pts.length - 1) line segments. Contour added starts at pts0, then adds a line for every additional Point in pts array. If close is true, appends PathVerb.CLOSE to Path, connecting ptspts.length - 1 and pts0.

If pts is empty, append PathVerb.MOVE to path.

Return

reference to Path

Parameters

pts

array of line sharing end and start Point

close

true to add line connecting contour end and start

See also


fun addPoly(pts: FloatArray, close: Boolean): Path

Adds contour created from line array, adding (pts.length / 2 - 1) line segments. Contour added starts at (pts0, pts1), then adds a line for every additional pair of floats in pts array. If close is true, appends PathVerb.CLOSE to Path, connecting (ptscount - 2, ptscount - 1) and (pts0, pts1).

If pts is empty, append PathVerb.MOVE to path.

Return

reference to Path

Parameters

pts

flat array of line sharing end and start Point

close

true to add line connecting contour end and start

See also