Beispiel #1
0
		protected override Gdk.Rectangle OnMouseMove (Context g, Color strokeColor, ImageSurface surface,
		                                              int x, int y, int lastX, int lastY)
		{
			double cx = Math.Round (x / 100.0) * 100.0;
			double cy = Math.Round (y / 100.0) * 100.0;
			double dx = (cx - x) * 10.0;
			double dy = (cy - y) * 10.0;

			for (int i = 0; i < 50; i++) {
				g.MoveTo (cx, cy);
				g.QuadraticCurveTo (
					x + Random.NextDouble () * dx,
					y + Random.NextDouble () * dy,
					cx,
					cy);
				g.Stroke ();
			}

			return Gdk.Rectangle.Zero;
		}