private void pictureBox1_MouseMove_Click(object sender, EventArgs e) { if (mouseDown) { bitmapClone = (Bitmap)bitmap.Clone(); x1 = e.X; y1 = e.Y; MyDrawing.drawline(x0, y0, x1, y1, bitmap, pictureBox1, color); bitmap = bitmapClone; } }
private void button1_Click(object sender, EventArgs e) { MyDrawing.drawline(50, 20, 200, 20, bitmap, pictureBox1, Color.Green); }