Community
Participate
Working Groups
ScalableFigure provides a mechanism to scale a figure using the "setScale(double scale);" method; however, this provides uniform scaling only. could we possibly also have something like: "setScale(double xScale, double yScale);" method; which allows for non-uniform scaling and also propagates to the ZoomManager? Thanks, Elias.
I wrote my own XYScaledGraphics that allows you to scale the X and Y independently. I posted this a while ago (https://bugs.eclipse.org/bugs/show_bug.cgi?id=129471), but GEF was in API freeze, and it was suggested that GEF will move towards SWT's transformation, which does support this. If you want, I can post my XYScaledGraphics.
Certainly, please do - thanks! For our problem, we needed to scale along the x-axis only. So what we did was create a layout manager that expands figures in the x direction when the canvas is resized. We took care of the labels separately, in order for them not to be scaled, by translating them to their proper location. E.
It would be nice if we could generalize ScalableFigure this way. However, the getScale() method, which is included in the ScalableFigure interface does not make sense in such a context and would need to be removed, which is not possible without breaking API. Things are similarly for ScaledGraphics. It would make sense to implement scale(float, float) from Graphics here as well (which would make the XYScaledGraphics from Zest obsolete, so we would remove it and share the same ScaledGraphics implementation). However, here, Graphics offers getAbsoluteScale(), which does not make sense in such a scenario either. As such, breaking API is required here as well. Updated summary, changed milestone to FUTURE, which shall indicate that this is something that should be included in a 4.0 release.
As Draw2d is now only maintained (and we are not planning to break its existing API), resolving this as WONTFIX.