|coordinate mapping [message #148298]
||Sat, 21 August 2004 12:23
| Bernd Hofner
Registered: July 2009
I'd like to use the XYLayout to generate a simple technical drawing.
Naturally, my model coordinates are in some real-world unit, like
I guess that draw2d uses pixel coordinates when placing figures.
How do I map between the two coordinate systems?
Is it possible to set a org.eclipse.draw2d.geometry.Transform object on a
Or do I have to translate my model coordinates to the draw2d coordinates
each time I update my EditPart/Figure from the model?
If so, how do I get the scaling factors?
I can compuse the largest x/y extend of my model components and would get
something like realWorldMaxX and realWorldMaxY.
To get a scaling factor I would need the x/y extend of the canvas, which
probably changes if I use
the GEF Zooming features.
Powered by FUDForum
. Page generated in 0.06713 seconds