HTML5 canvas lines
Good evening.
I am trying to draw a few lines on the html5 canvas.
For starters, I am drawning a simple line, which I typed in the script
var canvas = document.getElementById('canvas');
var lines = canvas.getContext('2d');
lines.beginPath();
lines.moveTo(50, 100);
lines.lineTo(200, 50);
lines.stroke();
However nothing is showing up.
Inspecting the page shows that the canvas ID is indeed named "canvas":
<canvas id="canvas" width="550" height="400" style="position: absolute; display: block; background-color:rgba(255, 255, 255, 1.00);"></canvas>
What could be wrong here ?
