Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Modifying Mouse Points during a Tracker loop
|Re: Modifying Mouse Points during a Tracker loop [message #449350 is a reply to message #449349]
||Sun, 23 January 2005 06:37
| Joe Mihalich
Registered: July 2009
Btw, after taking a look at the tracker source code, I should elaborate |
on my "hacks", since one of them seems to be supported in the code.
The first thing I tried was adding a control listener to the tracker.
On the control moved handler method, I got the rectangle I set on the
tracker (getRectangles), which had been updated by the time my handler was
called. I then snapped the x, y point, and called setRectangles, and
overwrote the rectangle that was there.
I had some trace statements in the control moved handler, and the
points in the rectangle, and the resulting snap points were correct.
However, what I saw on the screen was not correct. Basically, the
mouse and the rectangle got way out of sync. IE: I started the tracker
at 0, 0, 50, 50. On the first mouse move, the rectangle was 0, 11, 50,
50, and I snapped it to 0, 20, 50, 50. The result was, the rectangle did
not move, it stayed at 0, 0, 50, 50. Not until I moved my mouse down to
about 0, 100 (x, y) did the actual rectangle move vertically down to the
next snap point.
It seemed the rectangle was lagging the mouse by about 100 pixels or
so. I don't mean literally lagging in that it would eventually catch up,
because it wouldn't...I mean it was not being drawing at the snap point
nearest the mouse cursor.
Current Time: Wed Aug 12 07:44:39 GMT 2020
Powered by FUDForum
. Page generated in 0.06062 seconds