/// <summary>
 /// Create an instance of <see cref="Interpolation"/>.
 /// </summary>
 /// <param name="from">The start position.</param>
 /// <param name="to">The end position.</param>
 /// <param name="speed">The speed in pixels / s.</param>
 /// <returns>An instance of <see cref="Interpolation"/>.</returns>
 public static Interpolation Start(POINT from, POINT to, double speed)
 {
     return(new Interpolation(from, to, Interpolation.Duration(from, to, speed)));
 }
Esempio n. 2
0
 /// <summary>
 /// Simulate touch drag.
 /// </summary>
 /// <param name="from">The start position.</param>
 /// <param name="to">The end position.</param>
 public static void Drag(Point from, Point to)
 {
     Drag(from, to, Interpolation.Duration(from, to, MoveSpeed));
 }
Esempio n. 3
0
 /// <summary>
 /// Simulate touch drag.
 /// </summary>
 /// <param name="from">The start position.</param>
 /// <param name="to">The end position.</param>
 /// <param name="speed">The speed for the drag pixels per second.</param>
 public static void Drag(Point from, Point to, double speed)
 {
     Drag(from, to, Interpolation.Duration(from, to, speed));
 }
Esempio n. 4
0
 /// <summary>
 /// Drags the mouse in one step.
 /// </summary>
 /// <param name="mouseButton">The mouse button to use for dragging.</param>
 /// <param name="from">Start point of the drag.</param>
 /// <param name="to">End point for the drga.</param>
 /// <param name="speed">The speed in pixels per second.</param>
 public static void Drag(MouseButton mouseButton, Point from, Point to, double speed)
 {
     Drag(mouseButton, from, to, Interpolation.Duration(from, to, speed));
 }
Esempio n. 5
0
 /// <summary>
 /// Moves the mouse to a new position.
 /// </summary>
 /// <param name="newPosition">The new position for the mouse.</param>
 /// <param name="speed">The speed in pixels per second.</param>
 public static void MoveTo(Point newPosition, double speed)
 {
     MoveTo(newPosition, Interpolation.Duration(Position, newPosition, speed));
 }
Esempio n. 6
0
 /// <summary>
 /// Moves the mouse to a new position.
 /// </summary>
 /// <param name="newPosition">The new position for the mouse.</param>
 public static void MoveTo(Point newPosition)
 {
     MoveTo(newPosition, Interpolation.Duration(Position, newPosition, MoveSpeed));
 }
Esempio n. 7
0
        /// <summary>
        /// Moves the mouse to a new position.
        /// </summary>
        /// <param name="newX">The new position on the x-axis.</param>
        /// <param name="newY">The new position on the y-axis.</param>
        public static void MoveTo(int newX, int newY)
        {
            var p = new Point(newX, newY);

            MoveTo(p, Interpolation.Duration(Position, p, MoveSpeed));
        }
Esempio n. 8
0
 /// <summary>
 /// Moves the mouse by a given delta from the current position.
 /// </summary>
 /// <param name="delta">The delta for the x-axis.</param>
 /// <param name="speed">The speed in pixels per second.</param>
 public static void MoveBy(Vector delta, double speed)
 {
     MoveTo(Position + delta, Interpolation.Duration(delta, speed));
 }