Point::operator- メソッド (gdiplustypes.h)

Point::operator- メソッドは、2 つの Point オブジェクトの X および Y データ メンバーを減算します。

構文

Point operator-(
  [in, ref] const Point & point
);

パラメーター

[in, ref] point

型: const Point

この Point オブジェクトの X および Y データ メンバーから X および Y データ メンバーが減算される Point オブジェクトへの参照。

戻り値

種類: ポイント

このメソッドは、2 つの Point オブジェクトの違いである Point オブジェクトを 返します。

注釈

このメソッドは、 Point オブジェクトの減算演算子をオーバーロードします。 A、B、および C が Point オブジェクトの場合、ステートメント C = A - BC = A.operator-(B) に相当します。

次の例では、2 つの Point オブジェクトを作成し、最初の Point オブジェクトから 2 番目の Point オブジェクトを減算し、結果を 3 番目の Point オブジェクトに格納します。

Point point1(40, 10);
Point point2(-20, -30);

// Point3 now contains the coordinates (60, 40).
Point point3 = point1 - point2; 

要件

要件
サポートされている最小のクライアント Windows XP、Windows 2000 Professional [デスクトップ アプリのみ]
サポートされている最小のサーバー Windows 2000 Server [デスクトップ アプリのみ]
対象プラットフォーム Windows
ヘッダー gdiplustypes.h (Gdiplus.h を含む)
Library Gdiplus.lib
[DLL] Gdiplus.dll

こちらもご覧ください

Point

Point::Equals

Point::operator+

Pointf