Point.Subtract 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
Subtract(Point, Point) | |
Subtract(Point, Vector) |
Subtract(Point, Point)
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)
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 에서 Point 정적을 사용 하 여 Subtract 메서드.
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