|
I have written source code before.
Collect data through a timer, and then determine the relative coordinate position of the current point according to the ratio of this data, define a POINT[100] array, leave an element to store the current coordinate value, and then turn the current element value to The last 99 elements are moved in. Of course, the array elements should be moved as a whole, and the last one discarded is the same as the queue data structure. After all the elements are moved, then draw them out.
The drawn effect may flicker. Of course, double buffering will not be used. |
|