Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » coordinate mapping
coordinate mapping [message #148298] Sat, 21 August 2004 16:23
Bernd Hofner is currently offline Bernd HofnerFriend
Messages: 68
Registered: July 2009
Member
Hello,

I'd like to use the XYLayout to generate a simple technical drawing.
Naturally, my model coordinates are in some real-world unit, like
millimetres.
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
view?

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.

Any hints?

Cheers,

Bernd
Previous Topic:editor with no palette..Possible?
Next Topic:Text manipulation
Goto Forum:
  


Current Time: Tue Jan 21 20:02:36 GMT 2025

Powered by FUDForum. Page generated in 0.04489 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top