If you just need to draw lines and nothing else, you can do this without the canvas.
Use a Tiled Background object (say, 2x2 pixels), stretch it and rotate.
For example:
on first click - create TiledBackground at (mouse.x, mouse.y)
on second click - set TiledBackground width to distance (self.x, self.y, mouse.x, mouse.y),
set angle towards (mouse.x, mouse.y)