Without trying the diff yet: smoothness is good but it's not the only thing that matters. Sharp turns and corners, ideally, must be recognized and created sharp, not smoothed out. How does your patch compare to the current code in this respect?
Also: maybe while you're at it, you could also add the tolerance slider to the controls bar of the tool, which is a very long-standing feature gap.
Thanks!
On Jan 24, 2008 2:05 AM, R M <hoverweasel@...400...> wrote:
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
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel