private void PictureBox1_MouseDown(object sender, MouseEventArgs e) { firstPoint = e.Location; if (activeTool == Tool.Fill) { DummyFill dummyFill = new DummyFill(); dummyFill.Fill(bitmap, e.Location, pen.Color); } else if (activeTool == Tool.Fill2) { MapFill mapFill = new MapFill(); mapFill.Fill(graphics, e.Location, pen.Color, ref bitmap); graphics = Graphics.FromImage(bitmap); pictureBox1.Image = bitmap; } }
private void PictureBox1_MouseDown(object sender, MouseEventArgs e) { prevPoint = e.Location; if (toolState == PaintToolState.Fill) { DummyFill dummyFill = new DummyFill(); dummyFill.Fill(bitmap, pen.Color, e.Location); pictureBox1.Refresh(); } else if (toolState == PaintToolState.Fill2) { MapFill mapFill = new MapFill(); mapFill.Fill(graphics, e.Location, pen.Color, ref bitmap); graphics = Graphics.FromImage(bitmap); pictureBox1.Image = bitmap; } }