Exemple #1
0
 private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
 {
     SetupPictureBox(BmpCreationMode.AfterFill, "");
     if (t == Tool.Fill)
     {
         MapFill mf = new MapFill();
         mf.Fill(gfx, firstpoint, pen.Color, ref btmp);
         SetupPictureBox(BmpCreationMode.AfterFill, "");
     }
     firstpoint = e.Location;
 }
Exemple #2
0
        private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
        {
            firstPoint = e.Location;
            if (activeTool == Tools.Fill)
            {
                //DFloodFill fill = new DFloodFill(pictureBox1, bmp.GetPixel(e.X, e.Y), pen.Color, firstPoint, bmp);
                //fill.Fill();

                MapFill mf = new MapFill();
                mf.Fill(gfx, firstPoint, pen.Color, ref bmp);
                SetupPictureBox(BmpCreationMode.AfterFill, "");
            }
        }
Exemple #3
0
 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;
     }
 }
Exemple #4
0
 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;
     }
 }