Friday, May 21, 2010

C++, drawing an image, deleting it, moving it slightly, re drawing it. I notice it being erased? Stop this?

Im drawing a mouse and it is made using an ellipse for a body, 4 ellipse paws, 2 ellipse eyes with 2 ellipse pupils and a 3 sided polygon nose.





Most of these are in seperate functions.





Is it normal that I notice the mouse sort of flashing black because it is being re drawn in Visual C++ 6? Or have I done something wrong?

C++, drawing an image, deleting it, moving it slightly, re drawing it. I notice it being erased? Stop this?
It's called "flickering".


The common way to overcome this in Windows is to erase and draw an image into off-screen buffer first, then copy resulting bitmap into destination device context (screen) using BitBlt() function.
Reply:If it is being redrawn to slow down movement - like draw, fill screen. Repeat the drawing and use fill screen once. The following has some of my benchmark speed measurements in Millions of Pixels Per Second for drawing ellipses. If you don’t consider drawing speed and monitor refresh Hz, you might get all sorts of weird displays.





http://freespace.virgin.net/roy.longbott...
Reply:what are you asking?

thank you cards

No comments:

Post a Comment