Esempio n. 1
0
        public void tt()
        {
            string st  = comboBox_t0.SelectedItem.ToString();
            string st1 = comboBox_t1.SelectedItem.ToString();
            float  n   = trackBar1.Value;
            float  t   = n * (float)0.1;

            // double t1 = n ;
            //MessageBox.Show(t.ToString());
            morf.ln_mas.Clear();
            groups.Search_group(st);
            mas_lines mas1 = new mas_lines(groups.Mas_group_lines[groups.view_group]);

            groups.Search_group(st1);
            mas_lines mas2 = new mas_lines(groups.Mas_group_lines[groups.view_group]);

            for (int i = 0; i < mas1.ln_mas.Count; i++)
            {
                float x1 = 0;
                float x2 = 0;
                float y1 = 0;
                float y2 = 0;
                try
                {
                    x1 = mas1.ln_mas[i].X1 * (1 - t) + mas2.ln_mas[i].X1 * t;
                    x2 = mas1.ln_mas[i].X2 * (1 - t) + mas2.ln_mas[i].X2 * t;
                    y1 = mas1.ln_mas[i].Y1 * (1 - t) + mas2.ln_mas[i].Y1 * t;
                    y2 = mas1.ln_mas[i].Y2 * (1 - t) + mas2.ln_mas[i].Y2 * t;

                    //MessageBox.Show(x1 + " "+ x2 + " " +y1 + " " + y2);
                    morf.Add(x1, y1, x2, y2);
                }
                catch { }
            }
        }
Esempio n. 2
0
 private void View_button_Click(object sender, EventArgs e)
 {
     Canvas_new.Image = null;
     try
     {
         string st1 = comboBox_t0.SelectedItem.ToString();
         groups.Search_group(st1);
         first_im = groups.Mas_group_lines[groups.view_group];
         string st = comboBox_t1.SelectedItem.ToString();
         groups.Search_group(st);
         second_im = groups.Mas_group_lines[groups.view_group];
     }
     catch { }
     Canvas_new.Invalidate();
 }
Esempio n. 3
0
        public void add(mas_lines figures) //добавление группы в словарь
        {
            view_group = -1;
            // nums = new Stack<int>();
            List <Lines> mas      = new List <Lines>();
            Stack <int>  old_line = figures.check_colore();

            nums = old_line;
            foreach (int i in old_line)
            {
                mas.Add(figures.ln_mas[i]);
            }
            Mas_group_lines.Add(new mas_lines(mas));
            groups_name.Add("num: " + (groups_name.Count + 1));
        }
Esempio n. 4
0
        SolidBrush redBrush = new SolidBrush(Color.Red);  //станд. рисовки закрашенной окружности (цвет)

        public mas_lines(mas_lines new_mas)
        {
            ln_mas = new_mas.ln_mas;
        }