Point.Subtract 메서드

정의

지정된 자를 빼거나 Point 지정한 VectorPoint을 뺍니다.

오버로드

Name Description
Subtract(Point, Point)

지정된 Point 다른 Point 지정한 값을 빼고 차이를 .로 Vector반환합니다.

Subtract(Point, Vector)

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

Subtract(Point, Point)

지정된 Point 다른 Point 지정한 값을 빼고 차이를 .로 Vector반환합니다.

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

매개 변수

point1
Point

빼는 지점 point2 입니다.

point2
Point

에서 빼는 지점입니다 point1.

반품

의 차이 point1 입니다 point2.

예제

다음 예제에서는 정적 Point 메서드를 Point 사용하여 다른 Subtract 메서드에서 빼는 방법을 보여줍니다.

private Vector subtractExample2()
{

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

    // Subtracts a Point from a Point using the static Subtract method
    // and returns the difference as a Vector.
    // vectorResult is equal to (-5, -35)
    Vector vectorResult = Point.Subtract(point1, point2);

    return vectorResult;
}
Private Function subtractExample2() As Vector

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

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

    Return vectorResult

End Function

추가 정보

적용 대상

Subtract(Point, Vector)

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

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

매개 변수

point
Point

빼는 지점 vector 입니다.

vector
Vector

vector 에서 뺄 수 있는 개체입니다point.

반품

의 차이 point 입니다 vector.

예제

다음 예제에서는 정적 Vector 메서드를 사용하여 빼는 PointSubtract 방법을 보여줍니다.

       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;
       }
Private Function subtractExample1() As Point

    Dim point1 As New Point(10, 5)
    Dim vector1 As 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).
    Dim pointResult As Point = Point.Subtract(point1, vector1)

    Return pointResult

End Function

추가 정보

적용 대상