private void Button1_Click(object sender, EventArgs e) { EpicoGraphics epico = new EpicoGraphics(); Estrela obj = new Estrela(); obj.Mat_render.CorBorda = new Epico.Sistema2D.RGBA(255, 0, 0, 0); obj.Mat_render.CorSolida = new Epico.Sistema2D.RGBA(255, 0, 150, 200); epico.AddObjeto2D(obj); epico.CriarCamera(640, 480); epico.Camera.Focar(obj); this.BackgroundImage = epico.Camera.Renderizar(); }
public static IEnumerable <Image> RenderEpico(int width, int height, bool showCursor) { //Size size = new Size(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height); Epico = new EpicoGraphics(); Estrela obj = new Estrela(); obj.Mat_render.CorBorda = new Epico.Sistema2D.RGBA(255, 0, 0, 0); obj.Mat_render.CorSolida = new Epico.Sistema2D.RGBA(255, 0, 150, 200); Epico.AddObjeto2D(obj); Form2D form = new Form2D(); form.MouseClick += (sender, e) => { Random rnd = new Random(Environment.TickCount); byte a = (byte)rnd.Next(0, 255); byte r = (byte)rnd.Next(0, 255); byte g = (byte)rnd.Next(0, 255); byte b = (byte)rnd.Next(0, 255); form.Mat_render.CorSolida = new Epico.Sistema2D.RGBA(a, r, g, b); }; Epico.AddObjeto2D(form); Epico.CriarCamera(width, height); Epico.Camera.Focar(obj); Epico.Debug = true; while (true) { Bitmap screen = Epico.Camera.Renderizar(); yield return(screen); } }
public static IEnumerable <Image> RenderEpico(int width, int height, bool showCursor) { //Size size = new Size(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height); EpicoGraphics epico = new EpicoGraphics(); Estrela obj = new Estrela(); obj.Mat_render.CorBorda = new Epico.Sistema2D.RGBA(255, 0, 0, 0); obj.Mat_render.CorSolida = new Epico.Sistema2D.RGBA(255, 0, 150, 200); epico.AddObjeto2D(obj); epico.CriarCamera(width, height); epico.Camera.Focar(obj); epico.Debug = true; while (true) { Bitmap screen = epico.Camera.Renderizar(); yield return(screen); } }