Point.Subtraction Point.Subtraction Point.Subtraction Point.Subtraction Operator

Definition

Überlädt

Subtraction(Point, Point) Subtraction(Point, Point) Subtraction(Point, Point) Subtraction(Point, Point)

Subtrahiert den angegebenen Point von einem anderen angegebenen Point und gibt die Differenz als Vector zurück.Subtracts the specified Point from another specified Point and returns the difference as a Vector.

Subtraction(Point, Vector) Subtraction(Point, Vector) Subtraction(Point, Vector)

Subtrahiert den angegebenen Vector vom angegebenen Point und gibt den resultierenden Point zurück.Subtracts the specified Vector from the specified Point and returns the resulting Point.

Subtraction(Point, Point) Subtraction(Point, Point) Subtraction(Point, Point) Subtraction(Point, Point)

Subtrahiert den angegebenen Point von einem anderen angegebenen Point und gibt die Differenz als Vector zurück.Subtracts the specified Point from another specified Point and returns the difference as a Vector.

public:
 static System::Windows::Vector operator -(System::Windows::Point point1, System::Windows::Point point2);
public static System.Windows.Vector operator - (System.Windows.Point point1, System.Windows.Point point2);
static member ( - ) : System.Windows.Point * System.Windows.Point -> System.Windows.Vector
Public Shared Operator - (point1 As Point, point2 As Point) As Vector

Parameter

point1
Point Point Point Point

Der Punkt, von dem point2 subtrahiert wird.The point from which point2 is subtracted.

point2
Point Point Point Point

Der Punkt, der von point1 subtrahiert wird.The point to subtract from point1.

Gibt zurück

Die Differenz zwischen point1 und point2.The difference between point1 and point2.

Beispiele

Das folgende Beispiel zeigt, wie Sie subtrahieren, eine Point von einem anderen Point und Zurückgeben einer Vector mithilfe der überladenen Operator (-).The following example shows how to subtract a Point from another Point and return a Vector using the overloaded (-) operator.

private Vector overloadedSubtractionOperatorExample2()
{

    Point point1 = new Point(10, 5);
    Point point2 = new Point(15, 40);

    // Subtracts a Point from another Point using the overloaded subtraction (-)
    // operator and returns the difference as a Vector.
    // vectorResult is equal to (-5, -35).
    Vector vectorResult = point1 - point2;

    return vectorResult;

}
Private Function overloadedSubtractionOperatorExample2() As Vector

	Dim point1 As New Point(10, 5)
	Dim point2 As New Point(15, 40)

	' Subtracts a Point from another Point using the overloaded subtraction (-)
	' operator and returns the difference as a Vector.
	' vectorResult is equal to (-5, -35).
	Dim vectorResult As Vector = point1 - point2

	Return vectorResult

End Function
Siehe auch

Subtraction(Point, Vector) Subtraction(Point, Vector) Subtraction(Point, Vector)

Subtrahiert den angegebenen Vector vom angegebenen Point und gibt den resultierenden Point zurück.Subtracts the specified Vector from the specified Point and returns the resulting Point.

public:
 static System::Windows::Point operator -(System::Windows::Point point, System::Windows::Vector vector);
public static System.Windows.Point operator - (System.Windows.Point point, System.Windows.Vector vector);
static member ( - ) : System.Windows.Point * System.Windows.Vector -> System.Windows.Point

Parameter

point
Point Point Point Point

Der Punkt, von dem vector subtrahiert wird.The point from which vector is subtracted.

vector
Vector Vector Vector Vector

Der Vektor, der von point1 subtrahiert wird.The vector to subtract from point1

Gibt zurück

Die Differenz zwischen point und vector.The difference between point and vector.

Beispiele

Das folgende Beispiel zeigt, wie Sie subtrahieren eine Vector aus einer Point mithilfe der überladenen Operator (-).The following example shows how to subtract a Vector from a Point using the overloaded (-) operator.

private Point overloadedSubtractionOperatorExample1()
{

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

    // Subtracts a Vector from a Point using the overloaded subtraction (-) operator.
    // pointResult is equal to (-10, -25)
    Point pointResult = point1 - vector1;
    
    return pointResult;

}
Private Function overloadedSubtractionOperatorExample1() As Point

	Dim point1 As New Point(10, 5)
	Dim vector1 As New Vector(20, 30)

	' Subtracts a Vector from a Point using the overloaded subtraction (-) operator.
	' pointResult is equal to (-10, -25)
	Dim pointResult As Point = point1 - vector1

	Return pointResult

End Function
Siehe auch

Gilt für: