This topic has not yet been rated - Rate this topic

Point.Subtract Method (Point, Vector)

Subtracts the specified Vector from the specified Point and returns the resulting Point.

Namespace: System.Windows
Assembly: WindowsBase (in windowsbase.dll)

public static Point Subtract (
	Point point,
	Vector vector
)
public static Point Subtract (
	Point point, 
	Vector vector
)
public static function Subtract (
	point : Point, 
	vector : Vector
) : Point
You cannot use methods in XAML.

Parameters

point

The point from which vector is subtracted.

vector

The vector to subtract from point.

Return Value

The difference between point and vector.

The following example shows how to subtract a Vector from a Point using the static Subtract method.

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

    // Subtracts a Vector from a Point using the static Subtract method
    // and returns the difference as a Point.
    // pointResult is equal to (-10, -25).
    Point pointResult = Point.Subtract(point1, vector1);

    return pointResult;

}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.