Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Zoom in time too long
Zoom in time too long [message #249017] Tue, 19 May 2009 06:54 Go to next message
Eclipse UserFriend
Originally posted by: sneha29.gmail.com

Hi,
I have created an RCP application which displays draw2d figures.
However, the zoom in action takes a longer time.
Following is the code snippet for both the actions:

Zoomin Action:
zoomInAction=new Action() {
public void run() {
logger.debug("Getting current scale...");
double currentScale=root.getScale();
double newScale=currentScale*1.25;
root.setScale(newScale);
}

zoomOutAction=new Action() {
public void run() {
logger.debug("Getting current scale...");
double currentScale=root.getScale();
double newScale=currentScale*0.8;
root.setScale(newScale);
}

In the above code snippet, 'root' is an object of
draw2d.ScalableLayeredPane.
As seen above, the code for both the actions is almost the same, except
for the multiplying factor. However the zoom in action is much slower
than the zoom out action.
I am not able to understand the reason for this behavior.

Has anybody come across such problem or is it a known issue?
Any pointers to look for this issue would be of great help.

Thanks,
Sneha
Re: Zoom in time too long [message #249182 is a reply to message #249017] Thu, 04 June 2009 06:04 Go to previous messageGo to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi,

Is this true for all other scaling factors? 0.5, 1.5 or 0.5, 2.0?

Cheers,
Alex
Re: Zoom in time too long [message #249240 is a reply to message #249182] Thu, 11 June 2009 12:51 Go to previous message
Eclipse UserFriend
Originally posted by: sneha29.gmail.com

Hi,

I tried it for following scale sets:
zoom in action: double newScale=currentScale*1.5
zoom out action: double newScale=currentScale*0.5

and
zoom in action: double newScale=currentScale*2.0
zoom out action: double newScale=currentScale*0.5

I checked the zoom in time for all of the above scales. But still the
zoom in action takes same time as previous scale. It is still taking
longer time than zoom out action.

From your reply, I had a question that does the scale setting affect
the zoom in/out time?

Thanks,
Sneha

Alex Boyko wrote:
> Hi,
>
> Is this true for all other scaling factors? 0.5, 1.5 or 0.5, 2.0?
>
> Cheers,
> Alex
>
Hi,
I have created an RCP application which displays draw2d figures.
However, the zoom in action takes a longer time.
Following is the code snippet for both the actions:

Zoomin Action:
zoomInAction=new Action() {
public void run() {
logger.debug("Getting current scale...");
double currentScale=root.getScale();
double newScale=currentScale*1.25;
root.setScale(newScale);
}

zoomOutAction=new Action() {
public void run() {
logger.debug("Getting current scale...");
double currentScale=root.getScale();
double newScale=currentScale*0.8;
root.setScale(newScale);
}

In the above code snippet, 'root' is an object of
draw2d.ScalableLayeredPane.
As seen above, the code for both the actions is almost the same, except
for the multiplying factor. However the zoom in action is much slower
than the zoom out action.
I am not able to understand the reason for this behavior.

Has anybody come across such problem or is it a known issue?
Any pointers to look for this issue would be of great help.

Thanks,
Sneha
Previous Topic:[Announce] GEF 3.5.0 I200906051552 is available
Next Topic:[zest] Network with pre-defined coordinates
Goto Forum:
  


Current Time: Wed Apr 24 15:12:59 GMT 2024

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

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

Back to the top