[C # Technical Reference] drawing in PictureBox to prevent flicker

Source: Internet
Author: User

Before opening to say something else, immediately the end of the year, Good Hope for the year-end award, but it seems that the project is very important, so the days are very close, but really do not feel bored, is afraid of too late. So hold on tight. Here's the straight point. said that the use of the things, are Google search, but these technologies can really use their own projects, their own things such as the New Year home nothing slowly summed up, now learn something else, also counted as a note it.

I need to draw the picture on the form, but in the actual test found the problem, that is, when the redraw will flicker, this problem in the Beginner C language course also encountered, in the program to draw the animation of high frequency refresh, will also produce flicker, and then the solution is to the animation double buffering (Double buffering) processing.


Before being intimidated by the term double buffering, let's start by exploring why flashing occurs when redrawing:
Said the principle of animation we all understand, is the use of the human eye visual residue (visual staying) phenomenon, when a picture into the human eye imaging, will not immediately disappear, but will still retain a short period of time, so when the continuous image at a high speed switch, the human eye will see the impact of the dynamic, Instead of a single image in the toggle.
This process can be referenced in Figure 1:

When these three images are switched directly at a certain frequency, people will see that a seems to be moving to the right.

So why do we have to flash when we are programming animations based on this principle? Is it because the speed of the computer is too slow enough to force it? Of course not!

If we do this without any processing, we draw on canvas canvases, so the computer processes this:

http://blueve.me/archives/633

[C # Technical Reference] drawing in PictureBox to prevent flicker

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.