Skip to main content



      Home
Home » Newcomers » Newcomers » Zoom in time too long
Zoom in time too long [message #255896] Fri, 09 May 2008 02:09 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 than the zoom out action.
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);
}

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 #255933 is a reply to message #255896] Fri, 09 May 2008 06:33 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Sneha,

You might want to check out the GEF newsgroup for questions like this.
I've added it to the "to" list of this reply so that your post will
appear there. It's more likely someone with draw2d knowledge will see
your question there.


sneha wrote:
> Hi,
> I have created an RCP application which displays draw2d figures.
> However, the zoom in action takes a longer time than the zoom out action.
> 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);
> }
>
> 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:How do i highlight PHPdoc tags (PHPDocumentor) and PHPUnit tags?
Next Topic:cann't import projects from the archive file
Goto Forum:
  


Current Time: Sat May 03 04:01:43 EDT 2025

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

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

Back to the top