Property:
rotate:
1*Math.PI/180
2*Math.PI/180
3*Math.PI/180
4*Math.PI/180
5*Math.PI/180
10*Math.PI/180
20*Math.PI/180
30*Math.PI/180
40*Math.PI/180
50*Math.PI/180
Canvas:
your browser does not support the canvas tag
Code:
var c = document.getElementById('myCanvas');
var ctx = c.getContext('2d');
ctx.rotate(
1*Math.PI/180)
;
ctx.fillRect(50,50,100,50);
Click the property values above to see the result
W3Schools.com
- Play it