Share via


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

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

구문

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

매개 변수

[in, ref] point

형식: const Point

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

반환 값

형식:

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

설명

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

예제

다음 예제에서는 두 개의 Point 개체를 만든 다음, 두 개의 Point 개체를 추가하고 결과를 세 번째 Point 개체에 저장합니다.

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

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

요구 사항

   
지원되는 최소 클라이언트 Windows XP, Windows 2000 Professional [데스크톱 앱만 해당]
지원되는 최소 서버 Windows 2000 Server[데스크톱 앱만]
대상 플랫폼 Windows
헤더 gdiplustypes.h(Gdiplus.h 포함)
라이브러리 Gdiplus.lib
DLL Gdiplus.dll

참고 항목

Point

Point::Equals

Point::operator-

Pointf