I am trying to rotate a bitmap about it's center point.
The bitmap I am using in my test project is 200 X 200 pixels.
By trial and error, I came up with the following. It works, but I don't understand why.
Does anyone understand why this works for the 200 X 200 bmp?
(I increment AngleX by 10 in WM_LBUTTONDOWN, and in 36 clicks the image comes full circle.)Code:myGraphics.TranslateTransform(200,200); myGraphics.RotateTransform(AngleX); myGraphics.TranslateTransform(-100,-100); myGraphics.DrawImage(&image,0,0);




Reply With Quote