Strange behaviour of line.graphics.lineTo

Whant to make a simple line
Using that code

var line = new Sprite ();
            line.graphics.lineStyle (5, 0x24AFC4);
            line.x =60;
            line.y = 200;
            line.graphics.lineTo (300,200);
            addChild (line);

But at screen i see this

but at code, as I understand right, I have straight horizontal line.

so, I understood.
.graphics.lineTo drawing from zero.
For my example, I need

line.x =60;
line.y = 200;
line.graphics.lineTo (200,0);

Try this :smile:

 _line.graphics.lineStyle(2, 0x24AFC4);
 _line.graphics.moveTo(100, 0);
_line.graphics.lineTo(200, 300);

Or how about this?

line.graphics.moveTo(60, 200);
line.graphics.lineTo(300, 200);

If you don’t change line.x and line.y, your coordinates will make more sense.