The Point::operator+ method adds the X and Y data members of two Point objects.
Point operator+( IN const Point & point );
Type: const Point
Reference to a Point object whose X and Y data members are added to the X and Y data members of this Point object.
Type: Type: Point
This method returns a Point object that is the sum of two Point objects.
This method overloads the addition operator for Point objects. If A, B, and C are Point objects, the statement C = A + B is equivalent to C = A.operator+(B).
The following example creates two Point objects, then adds the two Point objects and stores the result in a third Point object.
Point point1(40, 10); Point point2(20, 30); // Point 3 now contains the coordinates (60, 40). Point point3 = point1 + point2;
|Minimum supported client||Windows XP, Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||gdiplustypes.h (include Gdiplus.h)|