graphToScreen method
Converts a graph coordinate point to screen coordinates.
Use this to transform positions in graph space to screen space, taking into account the current viewport position and zoom level.
Parameters:
graphPoint: The point in graph coordinates
Returns the corresponding point in screen coordinates as ScreenPosition.
Example:
final nodePos = GraphPosition.fromXY(100, 100);
final screenPos = controller.graphToScreen(nodePos);
Implementation
ScreenPosition graphToScreen(GraphPosition graphPoint) {
return _viewport.value.toScreen(graphPoint);
}