开发者

drawing lines between shapes

I have one left panel in which there are different shapes like start,end connectors..... when i drag line image inside canvas i want to draw 开发者_如何学Goline/connector between two shapes how would i do it

i am new to flex any help appreciated

Thanks Sanil


Canvas has graphics property, which can be used to draw on:

var g:Graphics = canvas.graphics;
g.moveTo(10, 10);
g.lineTo(20, 10);

When shapes are moved, call g.clear() and draw lines with new coordinates. Reference: Graphics

Lines will appear under children of canvas. If you need to draw something over them, then you need something above your Canvas - maybe another Canvas positioned over first.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜