public function addPoint(sX:int,sY:int,eX:int,eY:int,
createArrow:Boolean):void
{
var g:Graphics =this.graphics;
g.lineStyle(1, 0xff0000, 1);
g.moveTo(sX, sY);
g.lineTo(eX, eY);
if(createArrow){// drawing arrow
g.lineStyle(6, 0x0000ff, 1);
g.moveTo(Math.round(eX+((sX-eX)/6)),
Math.round(eY+((sY-eY)/6))); // mid point
g.lineTo(eX, eY);
g.lineStyle(3, 0x00ff00, 1);
g.moveTo(Math.round(eX+((sX-eX)/6)),
Math.round(eY+((sY-eY)/6))); // mid point
g.lineTo(eX, eY);
}
}
This blog has been moved. This redirect you our new blog with all old posts..
Drawing Line and arrow using flex
How to drawing line with arrow in flex?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment