On Wed, 22 Aug 2007 17:28:13 -0300, "bulia byak" <buliabyak@...400...> wrote:
On 8/22/07, Diederik en Rezi <mail@...1689...> wrote:
In notepath.cpp from line 4051 onwards, the node type is determined.
As far as I can tell this class is not being used in the object-snapper, so I guess we'll have to do without this.
It's very easy just to borrow the math from there. Basically a node is smooth when its handles and itself all lie on one line.
(Of course, by "borrow the math", we mean factor it out into a function which can be used in both the original and places, not simply copy and pasting it.)
Someone here suggested a great idea: in seltrans, snap only if the current move/scale etc. is "small enough" and skip snapping otherwise. The "small enough" can be defined as a fraction of the current snapping distance. This way fast moves will be more responsive and only small slow movements will snap.
It's probably better to define it based on speed (distance/time) rather than just on distance -- compared to mice, tablets tend to send more events closer together, partly as a result of having finer spatial resolution. A purely distance-based threshold which works well with mice might not work well with tablets, and vice-versa.
GDK input events come with timestamps attached, so this should be relatively easy to do (aside from the necessary care to sample only event times that occur far enough apart to avoid underflow/overflow).
-mental