예제 #1
0
 private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
 {
     if (!isMouse)
     {
         return;
     }
     arrayPoints.SetPoint(e.X, e.Y);
     if (arrayPoints.GetCountPoints() >= 2)
     {
         graphics.DrawLines(pen, arrayPoints.GetPoints());
         pictureBox1.Image = map;
         arrayPoints.SetPoint(e.X, e.Y);
     }
 }
예제 #2
0
 private void Drawing(ArrayPoints points, Graphics graphics, PictureBox canvas,
                      Bitmap map, MouseEventArgs e)
 {
     if (!isMousePressed)
     {
         return;
     }
     points.SetPoint(e.X, e.Y);
     if (points.GetCountOfPoints() >= 2)
     {
         graphics.DrawLines(pen, points.GetPoints());
         canvas.Image = map;
         points.SetPoint(e.X, e.Y);
     }
 }