Point.Addition(Point, Vector) Operator

Definition

지정된 Point에 따라 지정된 Vector를 변환한 다음 결과를 반환합니다.Translates the specified Point by the specified Vector and returns the result.

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

Parameters

point
Point

변환할 점입니다.The point to translate.

vector
Vector

point를 변환할 크기입니다.The amount by which to translate point.

Returns

Point

지정된 된 지점이 지정된 된 벡터에서 변환의 결과입니다.The result of translating the specified point by the specified vector.

Examples

다음 예제에서는 추가 하는 방법을 보여 줍니다는 PointVector 오버 로드 된 (+)를 사용 하 여 연산자입니다.The following example shows how to add a Point to a Vector using the overloaded (+) operator.

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

    // Add point to a Vector using the overloaded (+) operator.
    // pointResult is equal to (30,35).
    Point pointResult = point1 + vector1;

    return pointResult;
}
Private Function overloadedAdditionOperatorExample() As Point

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

    ' Add point to a Vector using the overloaded (+) operator.
    ' pointResult is equal to (30,35).
    Dim pointResult As Point = point1 + vector1

    Return pointResult

End Function

Applies to

See also