HTML and CSS Reference
In-Depth Information
O
NLINE
http://htmlref.com/ch2/canvasscale.html
Next up is the
rotate(
angle
)
method, which can be used to rotate a drawing in a
clockwise direction by an
angle
defined in radians:
/* rotate to the right */
context.rotate(Math.PI/8);
writeBoxes(context);
/* rotate to the left */
context.rotate(-Math.PI/8);
writeBoxes(context);
O
NLINE
http://htmlref.com/ch2/canvasrotate.html