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

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

構文

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

パラメーター

[in, ref] point

型: const PointF

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

戻り値

種類: PointF

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

注釈

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

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

PointF point1(40.0f, 10.0f);
PointF point2(-20.0f, -30.0f);

// Point3 now contains the coordinates (60.0f, 40.0f).
PointF point3 = point1 - point2; 

要件

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

こちらもご覧ください

[等しい]

Point

Pointf

operator+