When to call translateToAbsolute? [message #229646] |
Mon, 22 January 2007 22:26 |
Cameron Bateman Messages: 481 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
|
|
|
Powered by
FUDForum. Page generated in 0.03121 seconds