Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » RectangleAnimation
RectangleAnimation [message #170107] Tue, 01 March 2005 16:44 Go to next message
Eclipse UserFriend
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 #170513 is a reply to message #170107] Sat, 05 March 2005 06:58 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
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
Re: RectangleAnimation [message #170632 is a reply to message #170513] Sun, 06 March 2005 04:19 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:GEF as RCP ?
Next Topic:Exception in ShortestPathConnectionRouter
Goto Forum:
  


Current Time: Fri Apr 26 04:11:34 GMT 2024

Powered by FUDForum. Page generated in 0.03034 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top