Esempio n. 1
0
 public ComputeCurve(UserPointController userPoints, Canvas canvas, int curveId)
 {
     this.userPoints = userPoints;
     n            = userPoints.GetCount();
     this.canvas  = canvas;
     this.curveId = curveId;
 }
Esempio n. 2
0
 public CurveController(UserPointController userPoints, Canvas canvas, int id)
 {
     this.canvas     = canvas;
     this.userPoints = userPoints;
     this.id         = id;
     computeCurve    = new ComputeCurve(userPoints, canvas, id);
     if (userPoints.GetCount() >= 2)
     {
         curves = computeCurve.UpdateSplines();
         addCurves();
     }
 }
Esempio n. 3
0
        public void AddNewCurve(Point startPointPos)
        {
            n++;
            UserPointController userPointController = new UserPointController(0, canvas, n, UserPoint_MouseMove);
            CurveController     curveController     = new CurveController(userPointController, canvas, n);
            Curve newCurve = new Curve(userPointController, curveController);

            activeCurve = newCurve;
            curves.Add(newCurve);

            userPointController.AddPoint(startPointPos);
            userPointController.AddPoint(startPointPos);
            curveController.AddPath();
            curveController.DrawCurves();
        }