Reputation: 49
This is my code:
canvas.lineCap = "round";
canvas.lineWidth = 15;
canvas.beginPath();
canvas.moveTo(100, 100);
canvas.lineTo(200, 100);
canvas.closePath();
If I delete canvas.closePath()
then canvas.lineCap
works otherwise that parameter
not work. So what is the problem?
Upvotes: 0
Views: 1066
Reputation: 695
Call
canvas.stroke();
Instead of
canvas.closePath();
canvas.closePath()
would mean you want to draw a polygon, which I assume is not the case.
Upvotes: 1