I apologized, if it is stupid question, but I didn't answer at this question:
I use wxMouseEvent with event.GetPosition():
EVT_MOTION(GraphCanvas::OnMotion)
....
void GraphCanvas::OnMotion(wxMouseEvent& event)
{
m_vector.push_back(event.GetPosition())
}
But if I move a little quicker, than I don't get all coordinates of move movement but just some. It seems, that window system don't send all events by moving, but just some. The processor seems to be idle by moving. How can I fix this?
Thank you for every answer.
Jakub Kulaviak
Recording mouse movement
- Ryan Norton
- wxWorld Domination!
- Posts: 1319
- Joined: Mon Aug 30, 2004 6:01 pm
Re: Recording mouse movement
Part of the big patch from AOL added similar functionality to WX - if you like looking at patches, you can see it here http://sourceforge.net/tracker/?func=de ... tid=309863Jakub wrote:I apologized, if it is stupid question, but I didn't answer at this question:
I use wxMouseEvent with event.GetPosition():
EVT_MOTION(GraphCanvas::OnMotion)
....
void GraphCanvas::OnMotion(wxMouseEvent& event)
{
m_vector.push_back(event.GetPosition())
}
But if I move a little quicker, than I don't get all coordinates of move movement but just some. It seems, that window system don't send all events by moving, but just some. The processor seems to be idle by moving. How can I fix this?
Thank you for every answer.
Jakub Kulaviak
[Mostly retired moderator, still check in to clean up some stuff]
-
- Earned some good credits
- Posts: 120
- Joined: Sun Aug 29, 2004 3:09 pm
- Location: Grenoble, France
- Contact:
Yes, window system never send all pixels traversed.
As your class is name GraveCanva, I suppose that your goal is to render a and-draw picture. If it is that, if you draw a continuous line instead of alone pixels, it looks good (it is the mecansim of paint or all other picture hand drawing program).
In all case, make sure that your back-buffer (if you have one) is not too slow as client-rendering slow down mouse event frequency.
As your class is name GraveCanva, I suppose that your goal is to render a and-draw picture. If it is that, if you draw a continuous line instead of alone pixels, it looks good (it is the mecansim of paint or all other picture hand drawing program).
In all case, make sure that your back-buffer (if you have one) is not too slow as client-rendering slow down mouse event frequency.
Although it is not too exact, I will make it this way. Thanks.Cursor wrote:Yes, window system never send all pixels traversed.
As your class is name GraveCanva, I suppose that your goal is to render a and-draw picture. If it is that, if you draw a continuous line instead of alone pixels, it looks good (it is the mecansim of paint or all other picture hand drawing program).
In all case, make sure that your back-buffer (if you have one) is not too slow as client-rendering slow down mouse event frequency.
Jakub