Table of Contents

Struct Rectangle

Rectangle struct

Namespace: HP.LFT.Common.Linux.Drawing
Assembly: HP.LFT.Common.Standard.dll
Syntax
public struct Rectangle

Constructors

Rectangle(int, int, int, int)

Declaration
public Rectangle(int x, int y, int width, int height)
Parameters
Type Name Description
int x
int y
int width
int height

Fields

Empty

Empty Rectangle object

Declaration
public static readonly Rectangle Empty
Field Value
Type Description
Rectangle

Properties

Bottom

Declaration
public int Bottom { get; }
Property Value
Type Description
int

Height

Declaration
public int Height { get; set; }
Property Value
Type Description
int

Left

Declaration
public int Left { get; }
Property Value
Type Description
int

Right

Declaration
public int Right { get; }
Property Value
Type Description
int

Top

Declaration
public int Top { get; }
Property Value
Type Description
int

Width

Declaration
public int Width { get; set; }
Property Value
Type Description
int

X

Declaration
public int X { get; set; }
Property Value
Type Description
int

Y

Declaration
public int Y { get; set; }
Property Value
Type Description
int

Methods

Contains(Rectangle)

Declaration
public bool Contains(Rectangle rect)
Parameters
Type Name Description
Rectangle rect
Returns
Type Description
bool

Contains(int, int)

Declaration
public bool Contains(int x, int y)
Parameters
Type Name Description
int x
int y
Returns
Type Description
bool

Equals(object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
ValueType.Equals(object)

FromLTRB(int, int, int, int)

Declaration
public static Rectangle FromLTRB(int left, int top, int right, int bottom)
Parameters
Type Name Description
int left
int top
int right
int bottom
Returns
Type Description
Rectangle

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()

Inflate(int, int)

Declaration
public void Inflate(int width, int height)
Parameters
Type Name Description
int width
int height

Intersect(Rectangle)

Declaration
public Rectangle Intersect(Rectangle rect)
Parameters
Type Name Description
Rectangle rect
Returns
Type Description
Rectangle

IntersectsWith(Rectangle)

Declaration
public bool IntersectsWith(Rectangle rect)
Parameters
Type Name Description
Rectangle rect
Returns
Type Description
bool

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()

Union(Rectangle)

Declaration
public Rectangle Union(Rectangle rect)
Parameters
Type Name Description
Rectangle rect
Returns
Type Description
Rectangle

Operators

operator ==(Rectangle, Rectangle)

Declaration
public static bool operator ==(Rectangle rect1, Rectangle rect2)
Parameters
Type Name Description
Rectangle rect1
Rectangle rect2
Returns
Type Description
bool

operator !=(Rectangle, Rectangle)

Declaration
public static bool operator !=(Rectangle rect1, Rectangle rect2)
Parameters
Type Name Description
Rectangle rect1
Rectangle rect2
Returns
Type Description
bool