Point.Addition(Point, Vector) 演算子

定義

指定した 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

パラメーター

point
Point

変換対象のポイント。The point to translate.

vector
Vector

point を変換する量。The amount by which to translate point.

戻り値

指定したポイントを指定したベクターで変換した結果。The result of translating the specified point by the specified vector.

オーバーロードされた (+) 演算子Point Vectorを使用してをに追加する方法を次の例に示します。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

適用対象

こちらもご覧ください