Home > Net > Questions about drawing in PICTUREBOX movement trajectory of the object
Questions about drawing in PICTUREBOX movement trajectory of the object
Time:10-17
In the beginning, is to use an array to store objects motion coordinates, and then mapped onto the picturebox, but later found that over time, the size of the array is more and more big, the memory is too big, so he want to use the method of the cache and picturebox size is 300 * 300, for example, in a 300 * 300 the bitmap to draw the trajectory of the object, then to display the bitmap in the picturebox, The problem here: 1. If the movement trajectory of the object scope is beyond the scope of bitmap? 2. If the bitmap to draw trajectory of a bigger, problem is returned to the origin, I really need to use most of the bitmap to satisfy the need, need to write the program before estimate the range of motion?
Don't know your thoughts, or didn't find the right way, the great god, please give advice or comments!
CodePudding user response:
With bitmap may not save in the province than the array, you array optimization, such as adding new coordinate point coordinate point to judge whether there is the record before, and reduce the sampling rate