Skip to main content



      Home
Home » Eclipse Projects » GEF » When to call translateToAbsolute?
When to call translateToAbsolute? [message #229646] Mon, 22 January 2007 17:26
Eclipse UserFriend
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 layout, fixed positions
Next Topic:toolbar visibility
Goto Forum:
  


Current Time: Sat May 24 13:20:18 EDT 2025

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

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

Back to the top