Point

Point class

Represents a pair of integer X and Y coordinates of a point on a 2-dimensional plane. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

class Point

Methods

MethodDescription
static Point Add(const Point&, const Size&)Adds the width and height values of the specified Size object to the X and Y coordinates values of the specified Point object correspondingly.
static Point Ceiling(const PointF&)Constructs a Point object from the specified PointF object by rounding the PointF object’s X and Y coordinates values to the next higher integer values.
bool Equals(const Point&) constDetermines if the current object and the specified object are equal, i.e. represent the same pair of X and Y coordinates values.
bool get_IsEmpty() constDetermines if both X and Y coordinates values are equal to 0.
int get_X() constReturns the value of X coordinate represented by the current object.
int get_Y() constReturns the value of Y coordinate represented by the current object.
int GetHashCode() constReturns a hash code for the current object.
size_t getStdHash() constReturns a hash value for the current object.
bool IsNull() constAlways returns false.
void Offset(int, int)Offsets the X and Y coordinates value represented by the current object by the specified values.
void Offset(Point)Offsets the X and Y coordinates represented by the current object by the values of X and Y coordinates represented by the specified Point object correspondingly.
operator PointF() constConstructs an instance of PointF object and initializes it with X and Y coordinates values of the current Point object.
operator Size() constConstructs an instance of Size object and initializes its width and height values with X and Y coordinates values represented by the current object correspondingly.
Point()Constructs a new Point object and initializes its X and Y coordinates values with 0.
Point(int, int)Constructs a new Point object and initializes it with the specified values.
Point(const Size&)Constructs a new Point object and initializes its X and Y coordinates values with the values of width and height of the specifide SizeF object correspondingly.
Point(int)Constructs a new Point object and initializes its X coordinate value with a value formed by high 16 bits of the specified 32-bit integer and its Y coordinate value with a vale formed by low 16 bits of the specified 32-bit integer value value.
static Point Round(const PointF&)Constructs a Point object from the specified PointF object by rounding the PointF object’s X and Y coordinates values to the nearest integer values.
void set_X(int)Sets the value of X coordinate represented by the current object.
void set_Y(int)Sets the value of Y coordinate represented by the current object.
static Point Subtract(const Point&, const Size&)Subtracts the width and height values of the specified Size object from the X and Y coordinates values of the specified Point object correspondingly.
String ToString() constReturns the string representation of the pair of X and Y coordinates values represented by the current object.
static Point Truncate(const PointF&)Constructs a Point object from the specified PointF object by truncating the PointF object’s X and Y coordinates values to the next lower integer values.

Fields

FieldDescription
static EmptyAn empty instance of Point class whose X and Y coordinates values are 0.

See Also