Re: GTK scribble example
- From: "Richard Warren" <rew primagraphics co uk>
- To: <gtk-app-devel-list gnome org>
- Subject: Re: GTK scribble example
- Date: Mon, 9 May 2005 09:35:01 +0100
I'm making a small drawing program with GTK, and I'm having an
issue that's also in the "scribble" example tutorial (using this as
an example because people would likely know what I'm talking about
that way). Anyways, the issue that I'm having is that the program
doesn't receive mouse movement events for every pixel that the
mouse moves, especially when the mouse moves fast. So my question
is, how do I make it receive more mouse movement events, even when
the mouse is moving fast, or how can I get around such problems in
a way that's smooth unlike just making lines to the last known
location of the mouse.
When you enable the events you want from your drawing area, are you
including the GDK_POINTER_MOTION_HINT_MASK event? I think the scribble
example does that, so if you've based it on that you probably are.
If so, I believe that might be why you're not getting all the positions. An
explanation can be found at:
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Events.html#GdkEventMask
Look at the bit about the ...HINT_MASK for details. Then try not using
hints, but be aware that your application may lag a bit when the mouse is
moved quickly.
Hope that helps,
Richard.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]