I draw a lot of sectors on canvas (like a circle graph) and I need rotate it. Unfortunately it's to slow, so I tried to draw it only once and than save bitmap and draw the bitmap. I tried:
v=ctx.getImageData(0, 0, 100, 100)
ctx.rotate(Math.PI/2)
ctx.putImageData(v, 0, 0)
The problem is, that ImageData doesn't rotate (even translate and scale doesn't work). Is it posible to make just Image? I couldn't find the answer, there's just canvas.toDataURL, but it takes whole canvas, I need just part of it.