C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2720
Number of posts: 5746

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Rotating an image and placing it on a graphics surface Posted by zerriatt on 23 Mar 2009 at 2:19 AM
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!



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.