Exemple #1
0
 private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
 {
     firstPoint = e.Location;
     if (activeTool == Tools.Fill)
     {
         MapFill mf = new MapFill();
         mf.Fill(gfx, firstPoint, pen.Color, ref bmp);
         SetupPictureBox(BmpCreationMode.AfterFill, "");
     }
 }
Exemple #2
0
 private void pictureBox1_MouseDown(object sender, MouseEventArgs e)             // при нажатии на мышку запоминает его местоположение
 {
     prevPoint = e.Location;
     if (dmode == DrawMode.Fill)
     {
         MapFill mfill = new MapFill();
         mfill.Fill(grfx, e.Location, pen.Color, ref bmp);
         pictureBox1.Image = bmp;
         grfx = Graphics.FromImage(bmp);
     }
 }
Exemple #3
0
        public void GDI_Fill(Point point)
        {
            DrawShapes();
            MapFill mf = new MapFill();

            mf.Fill(graphics, point, pen.Color, ref bitmap);
            graphics          = Graphics.FromImage(bitmap);
            pictureBox1.Image = bitmap;
            ClearShapes();
            pictureBox1.Refresh();
        }
        private void Mouse_Down(object sender, MouseEventArgs e)
        {
            first  = e.Location;
            second = first;

            if (current == Tools.Fill)
            {
                MapFill mf = new MapFill();
                mf.Fill(g, first, pen.Color, ref bm);
                SetupPictureBox(BmpCreationMode.Fill, "");
            }
        }
Exemple #5
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 #6
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 #7
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;
     }
 }
Exemple #8
0
 private void draw_area_MouseDown(object sender, MouseEventArgs e)
 {
     first_p = e.Location;
     if (activeTool == Tool.Fill) //BFS lul
     {
         DummyFill dummyFill = new DummyFill();
         dummyFill.Fill(bitmap, e.Location, pen.Color);
         draw_area.Refresh();
     }
     else if (activeTool == Tool.Fill2) //seems more advanced and efficient
     {
         MapFill mapFill = new MapFill();
         mapFill.Fill(graphics, e.Location, pen.Color, ref bitmap);
         graphics        = Graphics.FromImage(bitmap);
         draw_area.Image = bitmap;
     }
 }