예제 #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, "");
     }
 }
예제 #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);
     }
 }
예제 #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();
        }
예제 #4
0
        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, "");
            }
        }
예제 #5
0
파일: Form1.cs 프로젝트: MirasK/Gunship
        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, "");
            }
        }
예제 #6
0
파일: Form1.cs 프로젝트: DanSalim/PP2
 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;
     }
 }
예제 #7
0
파일: Form1.cs 프로젝트: luikaaa27/PP2
 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;
     }
 }
예제 #8
0
파일: Form1.cs 프로젝트: zhakha/pp2-1
 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;
     }
 }