Point.Subtraction 연산자

정의

지정된 Vector에서 지정된 Point 또는 Point를 뺍니다.

오버로드

Subtraction(Point, Point)

또 다른 지정된 Point에서 지정된 Point를 빼고 그 차이를 Vector로 반환합니다.

Subtraction(Point, Vector)

지정된 Vector에서 지정된 Point를 빼고 결과 Point를 반환합니다.

Subtraction(Point, Point)

또 다른 지정된 Point에서 지정된 Point를 빼고 그 차이를 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

매개 변수

point1
Point

point2를 빼는 점입니다.

point2
Point

point1에서 뺄 점입니다.

반환

Vector

point1point2의 차이입니다.

예제

다음 예제에서는 빼기를 Point 다른 Point 반환를 Vector 오버 로드 된 (-) 연산자를 사용 하 여.

      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

추가 정보

적용 대상

Subtraction(Point, Vector)

지정된 Vector에서 지정된 Point를 빼고 결과 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
Public Shared Operator - (point As Point, vector As Vector) As Point

매개 변수

point
Point

vector를 빼는 점입니다.

vector
Vector

point1에서 뺄 벡터입니다.

반환

Point

pointvector의 차이입니다.

예제

다음 예제에서는 빼기는 Vector 에서 Point 오버 로드 된 (-) 연산자를 사용 하 여 합니다.

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

추가 정보

적용 대상