add(...segment: (Segment | Point | number[])[]): Segment | Segment[]
and haxe code
@:overload(function(point:Point):Point { })
function add(number:Float):Point;
function onload() {
var canvas:js.html.CanvasElement = cast Browser.document.getElementById('myCanvas');
paper = Lib.nativeThis.paper;
paper.setup(canvas);
var path:Path = new Path();
// Give the stroke a color
path.strokeColor = new Color('black');
var start:Point = new Point(100, 100);
// Move to start and draw a line from there
path.moveTo(start);
// Note that the plus operator on Point objects does not work
// in JavaScript. Instead, we need to call the add() function:
path.lineTo(start.add([200, -50]));//here is wrong.
// Draw the view now:
paper.view.draw();
}
from paper.js
and haxe code