I would like to think about how to implement free-form drawing in a drawing application. Given that the command object will include a click down, arbitrary drag and drop, how will it be necessarily saved in the command and drawn in the context of the bitmap?
First, will the data just correspond to each pixel coordinate in the mousemove command placed on a large list? I cannot come up with any other obvious approach, as the user probably does not draw long, completely straight lines that can be optimized.
Will its drawing essentially print solid circles (radius, which is the width of the pen), at each coordinate specified in the mouse move, and interpolate between them if the movement is far enough?
Update: An explanation of what I had in mind when I asked how the data would be stored. I talked about how the data in the command object would look, and thought it would be a list of βmove-toβ pixel coordinates to represent the action. I did not mean the representation of the data in the bitmap that was drawn.
source share