private void BtnQuadrado_Click(object sender, EventArgs e) { Quadrado obj = new Quadrado(); obj.Pos = PosAleatorio(); var rnd = new Random(Environment.TickCount); obj.Mat_render.CorBorda = new RGBA((byte)rnd.Next(0, 255), (byte)rnd.Next(0, 255), (byte)rnd.Next(0, 255), (byte)rnd.Next(0, 255)); obj.Mat_render.CorSolida = new RGBA((byte)rnd.Next(0, 255), (byte)rnd.Next(0, 255), (byte)rnd.Next(0, 255), (byte)rnd.Next(0, 255)); obj.GerarGeometria(45, raio_padrao); engine2D.AddObjeto(obj); AtualizarComboObjetos2D(); cboObjeto2D.SelectedValue = obj; }