You can do it with a sprite that has a hotspot at it's left. Then you can position it to (x0,y0), set it's angle toward (x1,y1) and set it's width to distance(x0,y0,x1,y1). The height of the sprite is the thickness of the line.
An example that does this is here:
Another idea is to use the canvas plugin which has an action to draw a line.