From RAD Studio API Documentation
Jump to: navigation, search


constructor Create(const Origin: TPoint); overload;                              // empty rect at given origin
constructor Create(const Origin: TPoint; Width, Height: Integer); overload;      // at TPoint of origin with width and height
constructor Create(const Left, Top, Right, Bottom: Integer); overload;           // at Left, Top, Right, and Bottom
constructor Create(const P1, P2: TPoint; Normalize: Boolean = False); overload;  // with corners specified by p1 and p2
constructor Create(const R: TRect; Normalize: Boolean = False); overload;


TRect(const TPoint& TL) _ALWAYS_INLINE {
TRect(const TPoint& TL, int width, int height) _ALWAYS_INLINE {
TRect(int l, int t, int r, int b) _ALWAYS_INLINE {
TRect(const TPoint& TL, const TPoint& BR) _ALWAYS_INLINE {
TRect(const RECT& r) _ALWAYS_INLINE {


Type Visibility Source Unit Parent
constructor public
System.Types TRect


Creates a TRect rectangle.

Use Create to construct and initialize a new TRect rectangle having Integer coordinates:

  • Origin and P1 represent the upper-left corner of the rectangle as the TPoint type point.
  • P2 represents the lower-right corner of the rectangle as the TPoint type point.
  • Top, Bottom, Right, and Left are Integer vertical or horizontal coordinates of the upper, lower, right, and left sides of the rectangle, respectively.
  • Width and Height are Integer width and height of the rectangle, respectively.
  • R is the rectangle with coordinates specified using the TRect type.
  • Normalize specifies to create a normalized rectangle.
Note: Create(const Origin: TPoint) creates an empty rectangle at the given Origin.

See Also