Zoom in time too long [message #255896] |
Fri, 09 May 2008 02:09  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.06584 seconds