g.Curve(p1 [, p2, p3, p4])

Return a new curve object with start at point p1, control points at p2 and p3, and end at p4. All points are passed through the Point constructor so they can also be passed in string form. Examples:

var c = new g.Curve(new g.Point(10, 10), new g.Point(10, 40), new g.Point(50, 40), new g.Point(50, 10));
var c = new g.Curve('10 10', '10 40', '50 40', '50 10');
var c = new g.Curve('10@10', '10@40', '50@40', '50@10');

The constructor also accepts a single Curve object as an argument; it creates a new curve with points cloned from the provided curve.