im tried to rotate a line with this
window.onload= function(){
var canvas=document.getElementById("foo");
var context=canvas.getContext("2d");
context.moveTo(250, 50);
context.lineTo(250, 250);
context.stroke();
context.rotate(0.30);
};
what am i doing wrong? i think im missing some steps. can anyone explain?
Use this instead: