|
Re: Coordinates, zoom and scrollbars [message #148267 is a reply to message #148264] |
Fri, 20 August 2004 14:19 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
The feedback layer is not scaled, but it is translated during scrolling. To
correct for this, once you are in absolute coordinates, you need to call:
myFeedbackLine.translateToRelative(Translatable)
or equivalently:
feedbacklayer.translateToRelative(t)
feedbacklayer.translateFromParent(t)
"Roberto Genini" <roberto.genini@icimsi.ch> wrote in message
news:opsc09j1fk71gv6x@news.eclipse.org...
> Hi all,
> I need to draw a line as insertion point for the part to be newly created.
> The position depends on the cursor location and the underlying parts.
> If I do not translate the line points to absolute the line position and
> size will be OK if zoom is 100% but shrinked if the zoom differs from
100%.
> If I translate the line points to absolute the line will be OK for all
zoom
> value but will wrong if the editor's scrollbar are not in the top-left
> position.
> I can't have my line with the right position and size for both zoom
> different from 100% AND scrollbars not on top-left position.
>
> To draw the line I first translate the points and the create a Polyline
>
> What am I doing wrong?
> I am using Eclipse 3.0 with GEF 3.0 on Win 2000
>
> Thanks in advance for any help
>
> Roberto
|
|
|
|
Powered by
FUDForum. Page generated in 0.02784 seconds