g.Polyline(points)

Return a new polyline object with points given by the points array.

The array can hold anything that can be understood by the Point constructor; Point objects, objects with x and y attributes, or strings in one of the two valid formats ("x y" or "x@y"). Array elements that cannot be understood as Points are replaced by 0,0 points.

If points are not provided, an empty Polyline is created.

Also accepts a polyline SVG string as an argument; then the g.Polyline.parse() function is used to generate points for the polyline.