Table of Contents

Struct Rectangle

Namespace
HP.LFT.Common.Linux.Drawing
Assembly
HP.LFT.Common.Standard.dll

Rectangle struct

public struct Rectangle
Inherited Members

Constructors

Rectangle(int, int, int, int)

public Rectangle(int x, int y, int width, int height)

Parameters

x int
y int
width int
height int

Fields

Empty

Empty Rectangle object

public static readonly Rectangle Empty

Field Value

Rectangle

Properties

Bottom

public int Bottom { get; }

Property Value

int

Height

public int Height { get; set; }

Property Value

int

Left

public int Left { get; }

Property Value

int

Right

public int Right { get; }

Property Value

int

Top

public int Top { get; }

Property Value

int

Width

public int Width { get; set; }

Property Value

int

X

public int X { get; set; }

Property Value

int

Y

public int Y { get; set; }

Property Value

int

Methods

Contains(Rectangle)

public bool Contains(Rectangle rect)

Parameters

rect Rectangle

Returns

bool

Contains(int, int)

public bool Contains(int x, int y)

Parameters

x int
y int

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

FromLTRB(int, int, int, int)

public static Rectangle FromLTRB(int left, int top, int right, int bottom)

Parameters

left int
top int
right int
bottom int

Returns

Rectangle

GetHashCode()

public override int GetHashCode()

Returns

int

Inflate(int, int)

public void Inflate(int width, int height)

Parameters

width int
height int

Intersect(Rectangle)

public Rectangle Intersect(Rectangle rect)

Parameters

rect Rectangle

Returns

Rectangle

IntersectsWith(Rectangle)

public bool IntersectsWith(Rectangle rect)

Parameters

rect Rectangle

Returns

bool

ToString()

public override string ToString()

Returns

string

Union(Rectangle)

public Rectangle Union(Rectangle rect)

Parameters

rect Rectangle

Returns

Rectangle

Operators

operator ==(Rectangle, Rectangle)

public static bool operator ==(Rectangle rect1, Rectangle rect2)

Parameters

rect1 Rectangle
rect2 Rectangle

Returns

bool

operator !=(Rectangle, Rectangle)

public static bool operator !=(Rectangle rect1, Rectangle rect2)

Parameters

rect1 Rectangle
rect2 Rectangle

Returns

bool