|
Rating An efficient tracking of the mouse is essential for painting application, and input event system (whether X11 or Windows) doesn't report all mouse move event, especially when the mouse move fast, and what the user might want to see as a round end up being a polyline.
 The black stroke was made without smoothing, and the red one with smoothing.
The solution I used was to draw Bezier curve (like in vector application) between two input events, instead of lines. The biggest problem is to guess the tangent around the points given by the input event system, because the painting program need to compute the tangent without knowing what will be the next mouse move. There are some possible workaround, like delaying the drawing of the last strokes until next user input or more subtle would be to repaint the last strokes when the full information available. But I am quiet satisfied by the results I get with the current cooking of the tangent.
 And with bristles, on the left the bluish strokes were made without smoothing, and on the right, the greenish one with various degrees of smoothing.
|