//масштабирование private void button3_Click(object sender, EventArgs e) { double ind_scale = Double.Parse(textBox5.Text); pol.scale(ind_scale); ClearWithout(); pol.draw(); pictureBox1.Image = pictureBox1.Image; return; }
//нарисовать private void button2_Click(object sender, EventArgs e) { pol = new Polyhedron(); switch (comboBox1.SelectedItem.ToString()) { case "Гексаэдр": pol = new cube(); break; case "Тетраэдр": pol = new Tetrahedron(); break; case "Октаэдр": pol = new Octahedron(); break; default: return; break; } switch (comboBox3.SelectedItem.ToString()) { case "Изометрическая": projection = 1; break; case "Ортогональная на YoZ": projection = 2; break; case "Ортогональная на XoZ": projection = 3; break; case "Ортогональная на XoY": projection = 4; break; case "Перспективная": projection = 5; break; default: return; break; } ClearWithout(); pol.draw(); pictureBox1.Image = pictureBox1.Image; }
//нарисовать private void button2_Click(object sender, EventArgs e) { pol = new Polyhedron(); switch (comboBox1.SelectedItem.ToString()) { case "Гексаэдр": pol = new cube(); break; case "Тетраэдр": pol = new Tetrahedron(); break; case "Октаэдр": pol = new Octahedron(); break; case "Загрузить из файла": LoadFromFile(); break; case "Фигура вращения": lastPoint = PointF.Empty; pictureBox1.MouseDown += pictureBox1_MouseDown; pictureBox1.MouseMove += pictureBox1_MouseMove; pictureBox1.MouseUp += pictureBox1_MouseUp; forming = new List <PointF>(); break; default: return; break; } switch (comboBox3.SelectedItem.ToString()) { case "Изометрическая": projection = 1; break; case "Ортогональная на YoZ": projection = 2; break; case "Ортогональная на XoZ": projection = 3; break; case "Ортогональная на XoY": projection = 4; break; case "Перспективная": projection = 5; break; default: return; break; } ClearWithout(); pol.draw(); pictureBox1.Image = pictureBox1.Image; }