Hi all,
    I've been having trouble getting lines smooth looking when drawing with the pencil tool.  Looking at the code, it seems like a reasonable job of interpolation is being done, but it is done while the path is being drawn, so it can't base the interpolation on all the points drawn by the user.

I made some changes to do the interpolation of the entire path on button release:

Here is an example using identical mouse points and identical tolerances:

http://arcsin.org/temp/Screenshot-3.png

On the left, is the current way; on the right, is the path interpolated using the entire curve.  Deferring interpolation decreases the number of knots created and improves (imo) the result appearance.   The tolerance is still adjustable in the same way it is currently.


Here's the diff, which is only a demonstration, and in no condition to be actually used: http://arcsin.org/temp/diff

In order to make the final patch, i guess the questions are ... is the way i'm saving the points ok (or should i use std::vector, etc),  should we forgo interpolating at all during drawing and instead just show the user a line path (which would greatly simplify the pencil-context code)?   or do people want to retain the old behavior and create a new setting/tool.

regards,
rob