I need to be able to rotate an image around a given point so that what ever part of the image appears in the center of my container is the center of rotation.
To calculate the center points, I am currently just taking the inverse of the translation applied to the image:
Rotate.CenterX = Translate.X * -1;
Rotate.CenterY = Translate.Y * -1;
However, the current calculation i'm using is not sufficient as it does not work if the image has been translated after being rotated.
I'm sure it's a reasonably straight forward trig function, I just can't think what it is!
Cheers