Bug 142444

Summary: ZoomManager support for scaling in both axes separatedly proposal
Product: [Tools] GEF Reporter: Pawel Garbacz <pawel.garbacz>
Component: GEF-Legacy GEF (MVC)Assignee: gef-inbox <gef-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse-bugzilla, nyssen
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on: 160744    
Bug Blocks:    

Description Pawel Garbacz CLA 2006-05-18 04:49:58 EDT
I found the ZoomManager supports scaling functionality but the zoom level set in the manager applies to both dimensions. I was thinking if there could be in future versions of GEF an ability to zoom the area using separated zoom levels for each axis. What do you think?
Comment 1 Steven R. Shaw CLA 2006-05-18 09:14:08 EDT
Do you mean scaling x and y at different ratios or do you mean scaling to fit where dimensions of the zoom area are not equal.

What would be a use-case that this functionality would enable?
Comment 2 Pawel Garbacz CLA 2006-05-18 09:22:13 EDT
I meant ability to scale each axis at different ratios. I was developing a project, that extensively uses GEF and needed ability to scale in vertical and horizontal dimension separatedly. Let's suppose you have an area containing some figures, and you want to zoom the whole area out, but in such way you want the height and width of the scaled area are not smaller than the size of canvas showing them. The image will fill the whole canvas area in this case. Then when you use zoom in action the area remains its height, but expands in x dimension.
Comment 3 Steven R. Shaw CLA 2006-05-18 09:37:06 EDT
I think you have to utilize the advanced graphics support of the SWT GC to enable this and then expose api on the ScalableFigure to allow scaling in x and y.  
Comment 4 Pawel Garbacz CLA 2006-05-18 09:40:55 EDT
You mean that feature would need support from SWT, right? Or you're analysing only my problem? What utilization do you have in mind?
Comment 5 Steven R. Shaw CLA 2006-05-18 09:47:03 EDT
I don't think appropriate api is exposed to support this.  However, the SWT GC supports scaling in both dimensions through the setTransform api.  The api would have to be propogated up through ScaledGraphics and ScalableFigure. 

Anyway, this could be a candidate for a contribution... (post 3.2 )
Comment 6 Pawel Garbacz CLA 2006-05-18 09:48:34 EDT
Great!
Comment 7 Randy Hudson CLA 2006-05-18 10:16:14 EDT
There is a duplicate bug that has discussed this already. This can be done since GEF 3.1, using advanced graphics. You'd have to re-invent zoommanager, but that class is simple.
Comment 8 Pawel Garbacz CLA 2006-05-18 10:21:32 EDT
Yes but I was thinking of adding such ZoomManager to the framework. This could ease things sometimes, don't you think? I thought indeed of reimplementing standard ZoomManager, but it would be not necessarily appropriate in my case (it could take more time I had to develop the whole module).
Comment 9 Alexander Nyßen CLA 2011-02-16 14:41:07 EST
Added dependency to bug #160744, which requests adding support for different scaling factors to ScalableFigure and ScaledGraphics. This would allow to come up with general support for x and y scale factors in the ZoomManager as well.