connectPoints
Connect all points in a path.
g.connectPoints([{x: -75, y: -25},{x: 75, y: 25}], true)
Parameters
points: The list of points to connect.closed: Iftrue, closes the shape. The default isfalse.
Closed vs Open
The closed parameter specifies if we should be added. This has an effect on drawing the path stroke, as shown below.
Closed shape:
g.connectPoints([{x: 0, y: 50}, {x: 0, y: 0}, {x: 50, y: 0}], true)
Open shape:
g.connectPoints([{x: 0, y: 50}, {x: 0, y: 0}, {x: 50, y: 0}], false)