Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » When to call translateToAbsolute?
When to call translateToAbsolute? [message #229646] Mon, 22 January 2007 22:26
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 480
Registered: July 2009
Senior Member
I have been running into some Figure positioning problems that have shown
me that I don't fully understand local coordinate systems. My question is
this: for an arbitrary Figure somewhere in a GraphicalViewer, how do I
know when I should call translateToAbsolute on its bounds and when I
should not? Is it enough to check getParent().isCoordinateSystem()?

The reason I ask is that I have noticed that when my figure is the direct
child of a Layer like the Feedback or Handle layer, calling
translateToAbsolute on the child figure's bounds get screwed up if the
ViewPort's top left is not absolute diagram top-left. In this case,
translateToParent doesn't get applied by the layer because it's not using
local coordinates, but the recursive call in translateToAbsolute climbs up
to the ViewPort grand-parent figure and a bogus translation occurs.


--Cam
Previous Topic:Draw2D Headless
Next Topic:toolbar visibility
Goto Forum:
  


Current Time: Sun Oct 17 10:58:26 GMT 2021

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

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

Back to the top