I am experimenting with animation in and can\'t work out how to draw an image at an angle. The desired effect is a few images drawn as usual, wit
It is interesting that the first solution worked for so many people, it didn't give the result I needed. In the end I had to do this:
ctx.save();
ctx.translate(positionX, positionY);
ctx.rotate(angle);
ctx.translate(-x,-y);
ctx.drawImage(image,0,0);
ctx.restore();
where (positionX, positionY) is the coordinates on the canvas that I want the image to be located at and (x, y) is the point on the image where I want the image to rotate.