Ejemplo n.º 1
0
 // 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();
     }
 }
Ejemplo n.º 2
0
 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();
     }
 }