private void DrawGraph() { if (Event.current.type != EventType.Repaint) { return; } SetMatrices(); Handles.matrix = graphToScreen; Handles.color = Color.black; graph.Draw(); }