RectangleAnimation [message #170107] |
Tue, 01 March 2005 16:44 |
Eclipse User |
|
|
|
Originally posted by: jojo.virtutech.se
Hi!
I'm trying to use the RectangleAnimation class (org.eclipse.ui.internal) to
animate some movement in my GEF-editor, but I'm having some trouble in
calculating the correct start- and stop-rectangles. The dimensions seems to be
correct, but their position are off; the animation is drawn at the top-left
corner of the display.
I guess another way of asking this would be: how do I get the screen coordinates
of my Figure?
/Jesper
|
|
|
|
Re: RectangleAnimation [message #170632 is a reply to message #170513] |
Sun, 06 March 2005 04:19 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
SWT tracker (used within animation class) requires Display coordinates. So
"absolute" in draw2d will be control-relative. Then you need to call
Control#toDisplay(swt.Rectangle rect)
"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:d0cfl4$qtu$4@www.eclipse.org...
> Translate the bounds to absolute.
>
> "Jesper Eskilson" <jojo@virtutech.se> wrote in message
> news:d0264n$8d1$1@www.eclipse.org...
>> Hi!
>>
>> I'm trying to use the RectangleAnimation class (org.eclipse.ui.internal)
> to
>> animate some movement in my GEF-editor, but I'm having some trouble in
>> calculating the correct start- and stop-rectangles. The dimensions seems
> to be
>> correct, but their position are off; the animation is drawn at the
> top-left
>> corner of the display.
>>
>> I guess another way of asking this would be: how do I get the screen
> coordinates
>> of my Figure?
>>
>> /Jesper
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03034 seconds