By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,139 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,139 IT Pros & Developers. It's quick & easy.

How do you update a bitmap without the one behind it showing or how do you clear the

P: 1
I am a beginner, this is my 4th Program I am making with Visual C#. The program I am making loads up a file and paints it to a bitmap, and I have put buttons in the form that rotate, flip, change the color, etc. in it. The problem I have is that when I click on the button instead of flipping or rotating the image and erasing the previous one as I intended, it does what it is told and paints on top of it, and as the file being drawn is rectangular instead of square this poses a problem. If you would like some code to help understand what I mean, by all means just request it.
Apr 20 '12 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 127
Yeah show us some code, that exactly can reproduce your problem.
Apr 24 '12 #2

Joseph Martell
Expert 100+
P: 196
This is a pretty common problem in the graphics programming world, especially in reference to 2D games. There are several ways to solve this problem, but in the end they all boil down to drawing some sort of background over your original image to zero it out and hide previous versions of the image. This can be as simple as drawing a square the color of your window background in the same position as the image you are drawing, but it can get much more complex too.

Beyond that, refer to Monomachus's comment. We will need actual code to get into the specifics of solving your problem.
Apr 30 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.