localX() public method

public localX ( double x ) : double
x double
return double
Ejemplo n.º 1
0
        private void SetTime_Click(object sender, RoutedEventArgs e)
        {
            float  prev   = point.Previous?.Value.InVal ?? float.MinValue;
            float  next   = point.Next?.Value.InVal ?? float.MaxValue;
            string res    = Microsoft.VisualBasic.Interaction.InputBox($"Enter time between {prev} and {next}", "Set Time", point.Value.InVal.ToString());
            float  result = 0;

            if (float.TryParse(res, out result) && result > prev && result < next)
            {
                X = graph.localX(result);
                graph.Paint(true);
            }
        }
Ejemplo n.º 2
0
        public Anchor(CurveGraph g, LinkedListNode <CurvePoint> p)
        {
            graph             = g;
            point             = p;
            X                 = graph.localX(point.Value.InVal);
            Y                 = graph.localY(point.Value.OutVal);
            this.DragDelta   += OnDragDelta;
            this.DragStarted += OnDragStarted;
            this.MouseDown   += Anchor_MouseDown;

            leftHandle = new Handle(this, true);
            graph.graph.Children.Add(leftHandle);
            rightHandle = new Handle(this, false);
            graph.graph.Children.Add(rightHandle);

            leftBez  = null;
            rightBez = null;
        }
Ejemplo n.º 3
0
        public Anchor(CurveGraph g, LinkedListNode<CurvePoint> p)
        {
            graph = g;
            point = p;
            X = graph.localX(point.Value.InVal);
            Y = graph.localY(point.Value.OutVal);
            this.DragDelta += OnDragDelta;
            this.DragStarted += OnDragStarted;
            this.MouseDown += Anchor_MouseDown;

            leftHandle = new Handle(this, true);
            graph.graph.Children.Add(leftHandle);
            rightHandle = new Handle(this, false);
            graph.graph.Children.Add(rightHandle);

            leftBez = null;
            rightBez = null;
        }