Class Rect

A Rect describes a rectangle in 2D space. It consists of a location (Left and Top) and dimensions (Width and Height).

Inheritance
System.Object
Rect
Namespace: PSPDFKitFoundation
Assembly: PSPDFKitFoundation.dll
Syntax
public sealed class Rect

Constructors

Rect(Single, Single, Single, Single)

Construct a Rect.

Declaration
public Rect(float left, float top, float width, float height)
Parameters
Type Name Description
System.Single left

The left position of the Rect on the horizontal axis.

System.Single top

The top position of the Rect on the vertical axis.

System.Single width

The width of the Rect.

System.Single height

The height of the Rect.

Properties

Height

The height of the Rect.

Declaration
public float Height { get; set; }
Property Value
Type Description
System.Single

Left

The left position of the Rect on the horizontal axis.

Declaration
public float Left { get; set; }
Property Value
Type Description
System.Single

Top

The top position of the Rect on the vertical axis.

Declaration
public float Top { get; set; }
Property Value
Type Description
System.Single

Width

The width of the Rect.

Declaration
public float Width { get; set; }
Property Value
Type Description
System.Single

Methods

Clone()

Clone the Rect.

Declaration
public Rect Clone()
Returns
Type Description
Rect

Union(Rect, Rect)

Calculate the union of two Rects.

Declaration
public static Rect Union(Rect first, Rect second)
Parameters
Type Name Description
Rect first

The first Rect.

Rect second

The second Rect.

Returns
Type Description
Rect

A new Rect which is the union of the two Rects.

Union(IEnumerable<Rect>)

Calculate the union of a list of Rects.

Declaration
public static Rect Union(IEnumerable<Rect> rects)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Rect> rects

The list of Rects.

Returns
Type Description
Rect

A new Rect which is the union of the list.