示例#1
0
 void drawhost_MouseRightButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     //points_toget = points;
     drawhost.MouseMove -= drawhost_MouseMove;
     points_toget = points;
     points = null;
     fossil = null;
 }
示例#2
0
        void drawhost_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (points != null)
            {
                points_toget = points;
                points = null;
                fossil = null;
                drawhost.MouseMove -= drawhost_MouseMove;
                return;
            }
            else
            {
                points_toget = null;
                points = new List<Point>();
                points.Add(e.GetPosition(drawhost));
                drawhost.MouseMove += new System.Windows.Input.MouseEventHandler(drawhost_MouseMove);
                fossil = new FossilVisual();
                drawhost.Add(fossil);
            }

            points.Add(e.GetPosition(drawhost));


            fossil.Points = calcRectPoints();
            fossil.Redraw();
        }
示例#3
0
 void drawhost_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     if (points == null)
     {
         points = new List<Point>();
         points.Add(e.GetPosition(drawhost));
         drawhost.MouseMove += new System.Windows.Input.MouseEventHandler(drawhost_MouseMove);
         fossil = new FossilVisual();
         drawhost.Add(fossil);
     }
     points.Add(e.GetPosition(drawhost));
     List<Point> pts = CalcSpline(points);
     fossil.Points = pts;
     points_toget = pts;
     fossil.Redraw();
 }
示例#4
0
        void drawhost_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (points == null)
            {
                points = new List<Point>();
                sub_points = new List<Point>();
                drawhost.MouseMove += new System.Windows.Input.MouseEventHandler(drawhost_MouseMove);
                fossil = new FossilVisual();
                drawhost.Add(fossil);
            }

            //отмасштабировали
            //gr.set_seed((int)(e.GetPosition(drawhost).X), (int)(e.GetPosition(drawhost).Y ));//можно добавить масштабирование
            //sub_points.Add(e.GetPosition(drawhost));//чтобы эта точка точно тут была

            unit(points, sub_points);//добавили все точки промежуточные,которые рисовались до этого момента
            points.Add(e.GetPosition(drawhost));//чтобы точно попала
            //seed = e.GetPosition(drawhost);
            set_seed(e.GetPosition(drawhost));
            
            fossil.Points = points;
         
            fossil.Redraw();
        }