Table of Contents

Struct RECT

Namespace
Wpf.Ui.Interop.WinDef
Assembly
Wpf.Ui.dll

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

int

Height

Gets the height of the rectangle.

public readonly int Height { get; }

Property Value

int

Left

Gets or sets the x-coordinate of the upper-left corner of the rectangle.

public int Left { readonly get; set; }

Property Value

int

Position

Gets the position of the rectangle.

public POINT Position { get; }

Property Value

POINT

Right

Gets or sets the x-coordinate of the lower-right corner of the rectangle.

public int Right { readonly get; set; }

Property Value

int

Size

Gets the size of the rectangle.

public SIZE Size { get; }

Property Value

SIZE

Top

Gets or sets the y-coordinate of the upper-left corner of the rectangle.

public int Top { readonly get; set; }

Property Value

int

Width

Gets the width of the rectangle.

public readonly int Width { get; }

Property Value

int

Methods

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object? obj)

Parameters

obj object

The 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

dx int
dy int

Union(RECT, RECT)

Combines two RECTs.

public static RECT Union(RECT rect1, RECT rect2)

Parameters

rect1 RECT
rect2 RECT

Returns

RECT

Operators

operator ==(RECT, RECT)

public static bool operator ==(RECT left, RECT right)

Parameters

left RECT
right RECT

Returns

bool

operator !=(RECT, RECT)

public static bool operator !=(RECT left, RECT right)

Parameters

left RECT
right RECT

Returns

bool