Struct Point

Point structure

Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.

public struct Point : IEquatable<Point>

Constructors

NameDescription
Point(int)Initializes a new instance of the Point struct using coordinates specified by an integer value.
Point(Size)Initializes a new instance of the Point struct from a Size .
Point(int, int)Initializes a new instance of the Point struct with the specified coordinates.

Properties

NameDescription
IsEmpty { get; }Gets a value indicating whether this this Point is empty.
X { get; set; }Gets or sets the x-coordinate of this Point.
Y { get; set; }Gets or sets the y-coordinate of this Point.

Methods

NameDescription
static Add(Point, Size)Adds the specified Size to the specified Point.
static Ceiling(PointF)Converts a PointF to a Point by performing a ceiling operation on all the coordinates.
static Round(PointF)Converts the specified PointF to a Point object by rounding the Point values to the nearest integer.
static Subtract(Point, Size)Translates a Point by the negative of a given Size .
static Truncate(PointF)Converts a PointF to a Point by performing a truncate operation on all the coordinates.
override Equals(object)Specifies whether this Point contains the same coordinates as the specified Object.
Equals(Point)Tests whether other Point structure has the same location of this Point structure.
override GetHashCode()Returns a hash code for this Point.
Offset(Point)Translates this Point by the specified Point.
Offset(int, int)Translates this Point by the specified amount.
override ToString()Converts the attributes of this Point to a human readable string.
operator +Translates a Point by a given Size .
operator ==Compares two Point objects. The result specifies whether the values of the X and Y properties of the two Point objects are equal.
explicit operatorCreates a Size with the coordinates of the specified Point.
implicit operatorConverts the specified Point structure to a PointF structure.
operator !=Compares two Point objects. The result specifies whether the values of the X or Y properties of the two Point objects are unequal.
operator -Translates a Point by the negative of a given Size .

Fields

NameDescription
static readonly EmptyRepresents a Point that has X and Y values set to zero.

See Also