Struct RECT
The RECT structure defines a rectangle by the coordinates of its upper-left and lower-right corners.
public struct RECT
- Inherited Members
Properties
Bottom
Gets or sets the y-coordinate of the lower-right corner of the rectangle.
public int Bottom { readonly get; set; }
Property Value
Height
Gets the height of the rectangle.
public readonly int Height { get; }
Property Value
Left
Gets or sets the x-coordinate of the upper-left corner of the rectangle.
public int Left { readonly get; set; }
Property Value
Position
Gets the position of the rectangle.
public POINT Position { get; }
Property Value
Right
Gets or sets the x-coordinate of the lower-right corner of the rectangle.
public int Right { readonly get; set; }
Property Value
Size
Gets the size of the rectangle.
public SIZE Size { get; }
Property Value
Top
Gets or sets the y-coordinate of the upper-left corner of the rectangle.
public int Top { readonly get; set; }
Property Value
Width
Gets the width of the rectangle.
public readonly int Width { get; }
Property Value
Methods
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override readonly int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Offset(int, int)
Sets offset of the rectangle.
public void Offset(int dx, int dy)
Parameters
Union(RECT, RECT)
Combines two RECTs.
public static RECT Union(RECT rect1, RECT rect2)
Parameters
Returns
Operators
operator ==(RECT, RECT)
public static bool operator ==(RECT left, RECT right)
Parameters
Returns
operator !=(RECT, RECT)
public static bool operator !=(RECT left, RECT right)