private void PictureBoxCanvas_MouseMove(object sender, MouseEventArgs e) { if (e.Button.HasFlag(MouseButtons.Left)) { var cmd = new DrawCommand(canvas, e.Location); history.Append(cmd); cmd.Execute(); pictureBoxCanvas.Refresh(); } }
public DrawCanvas(Image image, MacroCommand history) { g = Graphics.FromImage(image); this.history = history; history.Append(new ColorCommand(this, color)); }