30 day the 11th day of homemade operating system make form

Source: Internet
Author: User

This section, although the title is "Make a form", but actually make a form only need to draw a pixel, the difficulty is because of the increase of the counter, there will be flashing, here is the practice of eliminating flicker.


Counter form in the crazy count, the mouse on the flying number, will appear flashing, the solution is: in each picture of the painting, just draw counter layer, so that the layer of the mouse is not drawn. According to this idea, detailed methods such as the following.


We use different numbers to represent different layers, 2 is the Counter form layer, 3 is the mouse layer, and 1 is the background layer. We use the map array to store the information above, and when we draw the layer 1 o'clock, we traverse the map, we encounter 1, we draw the layer 2, we traverse the map, we encounter 2 to draw, and so does layer 3. So for the counter form in the case of the display count, after each count of the screen drawing, only need to traverse the map, encountered 2 to draw, you can not draw the mouse layer again, so as to eliminate the mouse because of its own constantly covered and then draw the flicker generated.





30 day the 11th day of homemade operating system make form

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.