private void DrawShape() { using (var g = Graphics.FromImage(pictureBox1.Image)) { g.Clear(pictureBox1.BackColor); _visualizer.Draw(g, _shape); pictureBox1.Refresh(); } }
private void pictureBox1_Paint(object sender, PaintEventArgs e) { var graphic = new MazeGraphic(e.Graphics); _visualizer.Draw(graphic, _maze.ViewData, _maze.UnitList); _maze.ProcessPlayerInNode(); }