2010/3/28 Krzysztof Kosiński <tweenk.pl@...400...>:
W dniu 29 marca 2010 00:42 użytkownik bulia byak <buliabyak@...400...> napisał:
How so? The current displacement of each selected node depends on: 1) its distance from dragged node; 2) the vector of the dragged node movement; and 3) value of pressure _at this time_ which affects the bell shape of the profile. Where is history in this?
When you release the pen, the pressure gradually changes from high to zero. You get a sharp bell profile that corresponds to the very low pressure reported in the last motion event before the release event.
You can get a "fat" profile only if you you are a ninja and can release the pen fast enough that the gradual decrease in pressure won't be picked up by the tablet :)
Ah, yes, we had this problem before. The solution was to let go of Alt first, and then release the pen. Still, it was somewhat clumsy, and I now understand why you can't do that with your no-history implementation.
But we can do something better this time. For example limit the rate of pressure lookups - make the function returning pressure look at the real pressure every 10th call, otherwise return a cached value. Yeah, I know, this is almost like adding a history, but not quite, and seems a quite harmless little hack :)