I want to draw a semi-complex element on a canvas rotated without rotating the canvas so that I don't need to calculate all of the various x/y points of the element.
I think that the basic process I need to use is:
- translate the 0,0 point to the spot the drawn element will be rotated around,
- rotate the canvas,
- draw the element,
- rotate the canvas back,
- restore the origin point.
I will need to do this more than once. I've read that the rotate / rotate back part can introduce some error, with the final image being off just a bit. Is there a way to avoid this?
See Question&Answers more detail:os