Thanks for the replies Mark and Keith!

Interpolation isn't a problem but it just didn't seem to be like the frequency 
of events was enough to accurately emulate the mouse motion when the mouse is 
moved quickly. It certainly wasn't 60 or 120hz, at least I didn't get nearly 
that many events or items in the mouse history... when the mouse is moved 
quickly the gap is quite large. I'm almost positive apps like Gimp must be 
getting more coordinates than this because doing things like spinning the 
mouse in circles really fast gives more accurate results than interpolating 
between MotionNotify coordinates would allow.

For XGetMotionEvents I simply called it from the my MotionNotify handler with 
the timestamp of the last MotionNotify event as the start time and 
CurrentTime as the stop time. I assume this is a valid way to get all 
positions and the result was the same as just using XMotionEvents themselves. 
This gives a very wide spacing between points during fast movements.

On Monday 06 May 2002 5:33 pm, Mark Vojkovich wrote:
> On Mon, 6 May 2002, Mosfet wrote:
> > Hi,
> >
> > I'm working on a brush tool for a paint program and have a question about
> > mouse event granularity. The problem is I need to get the coordinates of
> > all, (or as many as possible), pixels covered by the mouse pointer by a
> > mouse move when the tool is selected. By default if you move the mouse
> > from one part of the widget to another it only sends a few MotionNotify
> > (XMotionEvent) events while the cursor is in motion, not events for every
> > pixel covered.
>
>    That's because those pixels aren't covered.  Mouse acceleration
> causes the pointer to move in multiples of pixels rather than
> in single pixels.  The server isn't going to add extra motion
> events to interpolate.  You'll have to interpolate them yourself.
>
>
>                       Mark.
>
> _______________________________________________
> Xpert mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/xpert

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to