From: SourceForge.net <no...@so...> - 2012-02-20 12:49:32
|
The following forum message was posted by philit at http://sourceforge.net/projects/jung/forums/forum/252062/topic/5051386: Hello, i work on a graph editor. I use the VisualizationViewer to show the graph and a DefaultModalGraphMouse. When i add a vertex at layout position (0,0), why is the location on the VisualizationViewer not at (0,0)? The position of the vertex at the VisualizationViewer is rather (30,30). With the TRANSFORMING mode of the DefaultModalGraphMouse, the origin of the layout is transformed. But why returns the function layout.transform(Vertex(0,0)) always the same coordinates? My problem is, that i want to draw a grid, for a better user placement of the vertices. But after zooming and transforming i must adapt that grid to the zoom factor and the transformation. Therefore i need the screen coordinates of the layout origin. |