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