Ejemplo n.º 1
0
		public static void Main(string[] args)
		{
			// call the snippets
			Snippets snip = new Snippets();
			Surface surface = new PSSurface("snippets.ps", IMAGE_WIDTH, IMAGE_WIDTH);
			Context cr = new Context(surface);
			foreach (string snippet in Snippets.snippets)
			{
				cr.Save();
				Snippets.InvokeSnippet(snip, snippet, cr, IMAGE_WIDTH, IMAGE_HEIGHT);
				cr.ShowPage();
				cr.Restore();
			}
			surface.Finish ();
		}
Ejemplo n.º 2
0
		public static void Main(string[] args)
		{
			// call the snippets
			Snippets snip = new Snippets();
			foreach (string snippet in Snippets.snippets)
			{
				string filename = "./" + snippet + ".png";
				Surface surface = new ImageSurface(Format.ARGB32, IMAGE_WIDTH, IMAGE_WIDTH);
				Context cr = new Context(surface);
			
				cr.Save();
				Snippets.InvokeSnippet(snip, snippet, cr, IMAGE_WIDTH, IMAGE_HEIGHT);
				surface.WriteToPng(filename);
				cr.Restore();
			}
		}
Ejemplo n.º 3
0
		public static void Main(string[] args)
		{
			// call the snippets
			Snippets snip = new Snippets();
			foreach (string snippet in Snippets.snippets)
			{
				string filename = "./" + snippet + ".svg";
				Surface surface = new SvgSurface(filename, IMAGE_WIDTH, IMAGE_WIDTH);
				Context cr = new Context(surface);
			
				cr.Save();
				Snippets.InvokeSnippet(snip, snippet, cr, IMAGE_WIDTH, IMAGE_HEIGHT);
				cr.ShowPage();
				cr.Restore();
				surface.Finish ();
			}
		}
Ejemplo n.º 4
0
		public static void InvokeSnippet (Snippets snip, string snippet, Context cr, int width, int height)
		{
			MethodInfo m = snip.GetType ().GetMethod(snippet, types);
			m.Invoke (snip, new Object[] {cr, width, height});
		}
Ejemplo n.º 5
0
        public static void InvokeSnippet(Snippets snip, string snippet, Context cr, int width, int height)
        {
            MethodInfo m = snip.GetType().GetMethod(snippet, types);

            m.Invoke(snip, new Object[] { cr, width, height });
        }