Point Class

The Point class encapsulates a point in a 2-D coordinate system.

Point has these types of members:

Constructors

The Point class has these constructors.
Constructor Description
Point::Point() Creates a Point object and initializes the X and Y data members to zero. This is the default constructor.
Point::Point(INT,INT) Creates a Point object using two integers to initialize the X and Y data members.
Point::Point(Point&) Creates a new Point object and copies the data members from another Point object.
Point::Point(Size&) Creates a Point object using a Size object to initialize the X and Y data members.
 

Methods

The Point class has these methods.
Method Description
Point::Equals The Point::Equals method determines whether two Point objects are equal. Two points are considered equal if they have the same X and Y data members.
Point::operator-(Point&) The Point::operator- method subtracts the X and Y data members of two Point objects.
Point::operator+(Point&) The Point::operator+ method adds the X and Y data members of two Point objects.

Methods

The Point class has these methods.

Method Description
Point::Equals The Point::Equals method determines whether two Point objects are equal. Two points are considered equal if they have the same X and Y data members.
Point::Point Creates a Point object and initializes the X and Y data members to zero. This is the default constructor.
Point::Point Creates a new Point object and copies the data members from another Point object.
Point::Point Creates a Point object using a Size object to initialize the X and Y data members.
Point::Point Creates a Point object using two integers to initialize the X and Y data members.
Point::operator- The Point::operator- method subtracts the X and Y data members of two Point objects.
Point::operator+ The Point::operator+ method adds the X and Y data members of two Point objects.

Requirements

   
Target Platform Windows
Header gdiplustypes.h