Beispiel #1
0
	protected void OnDrawingarea1ExposeEvent (object o, ExposeEventArgs args)
	{
		var cw = new ContextWrapper (o);

		cw.Translate (cw.Center);

		cw.Context.LineWidth = 1;

		cw.Circle (0, 0, 50);

		cw.Context.StrokePreserve ();

		cw.PushColor ();
		cw.Color = new Color2 ("#FFC0CB");
		cw.Context.Fill ();


		cw.Circle (-50, -50, 100);

		cw.PopColor ();
		cw.Context.StrokePreserve ();
		cw.Color = new Color2 ("yellow", 0.5);
		cw.Context.Fill ();

		cw.Color = new Color2 ("black");
		cw.RoundedRectangle (new Rectangle(50, 50, 100, 50), 15);
		cw.Context.Stroke ();

		cw.Context.IdentityMatrix ();
		cw.Translate (cw.Center);

		var rnd = new Random ();
		var points = new PointD[15];
		for (var i = 0; i < points.Length; i++) {
			var p = new PointD (rnd.Next (200) - 100, rnd.Next (200) - 100);
			points[i] = p;
		}

		cw.Polygon (points);
		cw.Context.StrokePreserve ();
		cw.Context.Fill ();



		cw.Close ();
	}
Beispiel #2
0
		protected virtual void OnDrawingarea1ExposeEvent (object o, Gtk.ExposeEventArgs args)
		{
			var cw = new ContextWrapper (o);

			// draw scene
			DrawScene (cw);

			// modify scene params
			ModifyScene (cw.Width, cw.Height);
			
			cw.Close ();
		}
Beispiel #3
0
		protected virtual void OnDrawingarea1ExposeEvent (object o, Gtk.ExposeEventArgs args)
		{
			var cw = new ContextWrapper (o);

			DrawScene (cw, alpha);
			ModifyScene();

			cw.Close ();
		}