worldToScreen method

DiagramPoint worldToScreen(
  1. DiagramPoint world
)

Implementation

DiagramPoint worldToScreen(DiagramPoint world) => DiagramPoint(
  (world.x - center.x) * zoom + viewportSize.width / 2,
  (world.y - center.y) * zoom + viewportSize.height / 2,
);