|
|
Re: finding a figure off-screen [message #242841 is a reply to message #242765] |
Fri, 09 May 2008 17:17 |
Del Myers Messages: 82 Registered: July 2009 |
Member |
|
|
Yes, I was able to solve my particular problem by overriding the RootFigure used
in my Lightweight system. In this RootFigure, I assumed that the child was a
Viewport (not a problem, since I was using a FigureCanvas), and I manually
searched the contents of the Viewport, after translating the coordinates. This
works because the contents of the Viewport extend beyond the bounds of the Viewport.
However, I don't particularly like this solution. It is a bit of a hack. It
would be nice if the RootFigure just did this on its own. The API the way it is
gives the impression that off-screen figures just don't exist in the root.
Del
Felix L J Mayer wrote:
> You could do it manually by recursively iterating through all child figures
> of the root figure.
>
> "Del Myers" <delmyers.cs@gmail.com> wrote in message
> news:fvnrrm$ofi$1@build.eclipse.org...
>> I'm running into a little bit of a problem trying to find figures in my
>> draw2d application. The problem is this: I have several figures that are
>> being drawn offscreen. I need to get some data associated with those
>> figures. Here's the problem: even if I know the location of those figures,
>> if they are drawn off-screen, I can't get access to them using
>> findFigureAt() on the root figure. The reason is that the root figure has
>> a bounds equal to the size of the viewport, and findFigureAt() checks to
>> make sure that the point I'm looking for is within the bounds of the root
>> figure. But, off-screen figures will never be in these bounds. Is there
>> any way that I can get around this problem?
>>
>> Del
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03541 seconds