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.
"Therefore i need the screen coordinates of the layout origin. "
Therefore i need the coordinates in the panel/VisualizationViewer of the layout origin.
Log in to post a comment.