Struct Rectangle
Rectangle struct
public struct Rectangle
- Inherited Members
Constructors
Rectangle(int, int, int, int)
public Rectangle(int x, int y, int width, int height)
Parameters
Fields
Empty
Empty Rectangle object
public static readonly Rectangle Empty
Field Value
Properties
Bottom
public int Bottom { get; }
Property Value
Height
public int Height { get; set; }
Property Value
Left
public int Left { get; }
Property Value
Right
public int Right { get; }
Property Value
Top
public int Top { get; }
Property Value
Width
public int Width { get; set; }
Property Value
X
public int X { get; set; }
Property Value
Y
public int Y { get; set; }
Property Value
Methods
Contains(Rectangle)
public bool Contains(Rectangle rect)
Parameters
rectRectangle
Returns
Contains(int, int)
public bool Contains(int x, int y)
Parameters
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
FromLTRB(int, int, int, int)
public static Rectangle FromLTRB(int left, int top, int right, int bottom)
Parameters
Returns
GetHashCode()
public override int GetHashCode()
Returns
Inflate(int, int)
public void Inflate(int width, int height)
Parameters
Intersect(Rectangle)
public Rectangle Intersect(Rectangle rect)
Parameters
rectRectangle
Returns
IntersectsWith(Rectangle)
public bool IntersectsWith(Rectangle rect)
Parameters
rectRectangle
Returns
ToString()
public override string ToString()
Returns
Union(Rectangle)
public Rectangle Union(Rectangle rect)
Parameters
rectRectangle
Returns
Operators
operator ==(Rectangle, Rectangle)
public static bool operator ==(Rectangle rect1, Rectangle rect2)
Parameters
Returns
operator !=(Rectangle, Rectangle)
public static bool operator !=(Rectangle rect1, Rectangle rect2)