// Paint a series of points to the canvas as the mouse moves public void Canvas_MouseMove(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.None) { PointWithAttributes pt = new PointWithAttributes(); pt.point = e.Location; pt.color = c; stroke.Add(pt); Invalidate(); } }
private void Form1_MouseMove(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.None) { PointWithAttributes pt = new PointWithAttributes(); pt.color = currentColor; pt.point = e.Location; Stroke.Add(pt); Invalidate(); } }