mouseDrag sample rate!


#1

Hi Juce people,

I am currently working on a kind of “painting” application where you can form different shapes by moving the mouse. The problem I have, is in a way the “sample rate” of the mouseDrag() callback which I use to make my calculations (from the mouse movements) - the mouseDrag() callback is invoked “very few times” compared to the real DRAGGING movement executed over the component. So if I move the mouse really quickly I just get a couple of sample points and not the desired “line” I want to visualize.

Besides, I noticed, that the mouseMove() callback is invoked on a pretty high (I haven’t measured precisely) sample rate and is much more suitable for my needs, but unfortunately it ceases to be called when I put the mouse down on the canvas (from this moment on, logically only the mouseDrag() is called). So how can I achieve the desired sample rate of getting mouse coordinates ?

Thx a lot in advance!

Nina :roll:


#2

There’s a maxMouseMovesPerSecond value that I added to the windowing code (win32), because getting too many messages was causing problems sometimes. Can’t remember exactly why I did this (it was a long long time ago), but you might want to try messing with it and see what happens.


#3