Comment 18 for bug 263166

Revision history for this message
Scott Norris (scottie-z) wrote :

After more playing, I realize I was wrong -- Inkscape *doesn't* memorize the beginning of your stroke -- it simply discards it entirely. This can be seen by scribbling a very tiny circle for several seconds before ending the stroke on a long segment. The effect seems to be mass dependent -- if you set mass=0, pick a very precise starting point, and draw a line -- you will see several pixels of missing line. However, as mass increases the effect seems to decrease.

In any case, there seems to be a portion of the code dedicated to smoothing out the raw pen input in real time, and this seems to be the cause of our problem. See here, again from: src/dyna-draw-context.cpp

336 // If force is below the absolute threshold DYNA_EPSILON,
337 // or we haven't yet reached DYNA_VEL_START (i.e. at the beginning of stroke)
338 // _and_ the force is below the (higher) DYNA_EPSILON_START threshold,
339 // discard this move.
340 // This prevents flips, blobs, and jerks caused by microscopic tremor of the tablet pen,
341 // especially bothersome at the start of the stroke where we don't yet have the inertia to
342 // smooth them out.

Again, however this ends up playing out, we need to walk a fine line between preserving the smoothing of the whole curve, while reducing the effect at the beginning.