Breyta

Deila með


Point.Add(Point, Vector) Method

Definition

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

The Point structure to add.

vector
Vector

The Vector structure to add.

Returns

Returns the sum of point and vector.

Examples

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

Adding a Point structure to a Point structure is prohibited.

Applies to

See also