如何绘制draw2d折线

时间:2013-10-08 11:13:35

标签: javascript draw2d-js

何我用draw2d绘制折线(javascript不是eclipse)?

(遗憾的是,draw2d.org上没有例子)

到目前为止,我试过了:

var polyline = new draw2d.shape.basic.PolyLine();
polyline.addPoint(30, 0);
polyline.addPoint(30, 0);
polyline.addPoint(30, 70);
polyline.addPoint(50, 50);
polyline.addPoint(70, 70);
polyline.addPoint(70, 0);
canvas.addFigure(polyline);

0 个答案:

没有答案