Community
Participate
Working Groups
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?
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?
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.
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.
You mean that feature would need support from SWT, right? Or you're analysing only my problem? What utilization do you have in mind?
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 )
Great!
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.
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).
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.