Skip to content

Rectangle

Public Class

Stores a set of four integers that represent the left, top, right and bottom of a rectangle.

Inheritance Hierarchy

System.Object
Autodesk.Revit.DB.Rectangle

Namespace: Autodesk.Revit.DB

Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

Syntax

public class Rectangle : IDisposable

The Rectangle type exposes the following members.

Constructors

Name

Description


Public Method
Rectangle.

Create an empty Rectangle instance with values (0,0,0,0).


Public Method
Rectangle(Rectangle)

Constructs a new copy of the input ScreenRectangle object.


Public Method
Rectangle(Int32, Int32, Int32, Int32)

Creates an Rectangle instance with the specified four integers that represent the left, top, right and bottom of a rectangle.


Properties

Name

Description


Public Property

The y-coordinate of the bottom-right corner of the rectangle.


Public Property
IsValidObject

Specifies whether the .NET object represents a valid Revit entity.


Public Property

The x-coordinate of the top-left corner of the rectangle.


Public Property

The x-coordinate of the bottom-right corner of the rectangle.


Public Property

The y-coordinate of the top-left corner of the rectangle.


Methods

Name

Description


Public Method

Releases all resources used by the Rectangle


Public Method

Equals

Determines whether the specified object is equal to the current object.
(Inherited from Object)


Public Method

GetHashCode

Serves as the default hash function.
(Inherited from Object)


Public Method

GetType

Gets the Type of the current instance.
(Inherited from Object)


Public Method

Returns true if the rectangle coordinates are normalized to the screen coordinate space; that is, left is less than right and top is less than bottom.


Public Method

ToString

Returns a string that represents the current object.
(Inherited from Object)


Remarks

It usually represents a rectangle on the screen. Left must be less than right and top must be less than bottom.