Esempio 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();
     }
 }
Esempio 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();
     }
 }