Struct Point
Represents an ordered pair of x and y coordinates that define a point in a two-dimensional plane.
public struct Point
- Inherited Members
Constructors
Point(Size)
public Point(Size sz)
Parameters
sz
Size
Point(int)
Initializes a new instance of the Point class using coordinates specified by an integer value.
public Point(int dw)
Parameters
dw
int
Point(int, int)
Initializes a new instance of the Point class with the specified coordinates.
public Point(int x, int y)
Parameters
Fields
Empty
Creates a new instance of the Point class with member data left uninitialized.
public static readonly Point Empty
Field Value
Properties
IsEmpty
Gets a value indicating whether this Point is empty.
public readonly bool IsEmpty { get; }
Property Value
X
Gets the x-coordinate of this Point.
public int X { readonly get; set; }
Property Value
Y
Gets the y-coordinate of this Point.
public int Y { readonly get; set; }
Property Value
Methods
Add(Point, Size)
public static Point Add(Point pt, Size sz)
Parameters
Returns
Equals(Point)
public readonly bool Equals(Point other)
Parameters
other
Point
Returns
Equals(object?)
public override readonly bool Equals(object? other)
Parameters
other
object
Returns
GetHashCode()
Returns a hash code.
public override readonly int GetHashCode()
Returns
Offset(Point)
Translates this Point by the specified amount.
public void Offset(Point p)
Parameters
p
Point
Offset(int, int)
Translates this Point by the specified amount.
public void Offset(int dx, int dy)
Parameters
Subtract(Point, Size)
public static Point Subtract(Point pt, Size sz)
Parameters
Returns
ToString()
Converts this Point to a human readable string.
public override readonly string ToString()
Returns
Operators
operator +(Point, Size)
public static Point operator +(Point pt, Size sz)
Parameters
Returns
operator ==(Point, Point)
Compares two Point objects. The result specifies whether the values of the X and Y properties of the two Point objects are equal.
public static bool operator ==(Point left, Point right)
Parameters
Returns
explicit operator Size(Point)
public static explicit operator Size(Point p)
Parameters
p
Point
Returns
operator !=(Point, Point)
Compares two Point objects. The result specifies whether the values of the X or Y properties of the two Point objects are unequal.
public static bool operator !=(Point left, Point right)
Parameters
Returns
operator -(Point, Size)
public static Point operator -(Point pt, Size sz)