Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Rotating an image and placing it on a graphics surface
I would like to know how it is possible to rotate a bmp.
What I want to do is load an image, rotate it, then draw the rotated image onto an existing graphics g object. I do not want the graphics object rotated as I have drawn other things onto it before hand that must not be rotated. I have seen some example code where you load the image into a bmp object, rotate it (whereby the graphics object is rotated rather than the bmp only) and then the bmp drawn into the graphics object.
The image is an aircraft from a top down view, and I want to rotate the aircraft image, and the result of the rotation of the image ONLY is then drawn onto a graphics surface. Before hand, there are things drawn onto the graphics surface that must NOT be affected by the rotation.
Would I need a separate graphics object, and then merge the two together perhaps? if so, how is this done? could anyone give me some c# sample code to illustrate this solution?
Thanks for your help!
0 · ·