다음을 통해 공유


PointF::operator+ 메서드(gdiplustypes.h)

PointF::operator+ 메서드는 두 PointF 개체의 XY 데이터 멤버를 추가합니다.

구문

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

매개 변수

[in, ref] point

형식: const PointF

PointF 개체의 X 및 Y 데이터 멤버에 XY 데이터 멤버가 추가된 PointF 개체에 대한 참조입니다.

반환 값

형식: PointF

이 메서드는 두 PointF 개체의 합계인 PointF 개체를 반환합니다.

설명

이 메서드는 PointF 개체에 대한 더하기 연산자를 오버로드합니다. A, B 및 C가 PointF 개체인 경우 C = A + B 문은 C = A.operator+(B)와 동일합니다.

예제

다음 예제에서는 두 개의 PointF 개체를 만든 다음, 두 개의 PointF 개체를 추가하고 결과를 세 번째 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 포함)
라이브러리 Gdiplus.lib
DLL Gdiplus.dll

추가 정보

같음

Point

Pointf

연산자-