Point.Add(Point, Vector) Method

Definition

Suma una estructura Vector a una estructura Point y devuelve el resultado como una estructura Point.Adds a Vector to a Point and returns the result as a Point structure.

public:
 static System::Windows::Point Add(System::Windows::Point point, System::Windows::Vector vector);
public static System.Windows.Point Add (System.Windows.Point point, System.Windows.Vector vector);
static member Add : System.Windows.Point * System.Windows.Vector -> System.Windows.Point
Public Shared Function Add (point As Point, vector As Vector) As Point

Parameters

point
Point

Estructura Point que se va a sumar.The Point structure to add.

vector
Vector

Estructura Vector que se va a sumar.The Vector structure to add.

Returns

Point

Devuelve la suma de point y vector.Returns the sum of point and vector.

Examples

En este ejemplo se agrega un Point a un Vector y se devuelve el resultado como una estructura de Vector.This example adds a Point to a Vector and returns the result as a Vector structure.

private Point addPointAndVectorExample()
{
    Point point1 = new Point(10, 5);
    Vector vector1 = new Vector(20, 30);

    // Add Point and Vector using the static Add method.
    // pointResult is equal to (30,35).
    Point pointResult = Point.Add(point1, vector1);

    return pointResult;
}

Remarks

La adición de una estructura de Point a una estructura de Point está prohibida.Adding a Point structure to a Point structure is prohibited.

Applies to

See also