System.Types.TRectF.Create

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

TRectF() _ALWAYS_INLINE
TRectF(const TPointF& TL) _ALWAYS_INLINE {
TRectF(const TPointF& TL, float width, float height) _ALWAYS_INLINE {
TRectF(float l, float t, float r, float b) _ALWAYS_INLINE {
TRectF(const TPointF& TL, const TPointF& BR) _ALWAYS_INLINE {
TRectF(const RECT& r) _ALWAYS_INLINE {

Properties

Type Visibility Source Unit Parent
constructor public
System.Types.pas
SystemTypes.h
System.Types TRectF

Description

Creates a TRectF rectangle having floating-point coordinates.

Use Create to construct and initialize a new TRectF rectangle object having Single coordinates:

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

See Also