System.Types.TRect.Create

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

Delphi

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;

C++

TRect() _ALWAYS_INLINE
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 {

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
constructor public
System.Types.pas
SystemTypes.h
System.Types TRect


Beschreibung

Erstellt ein TRect-Rechteck.

Mit Create können Sie ein neues TRect-Rechteck mit Integer-Koordinaten erstellen und initialisieren:

  • Origin und P1 repräsentieren die linke obere Ecke des Rechtecks als Punkt (mit dem Typ TPoint).
  • P2 stellt die rechte untere Ecke des Rechtecks als TPoint-Punkt.
  • Top, Bottom, Right und Left sind vertikale oder horizontale Integer-Koordinaten der oberen, unteren, rechten bzw. linken Seite des Rechtecks.
  • Width und Height sind die Integer-Breite bzw. -Höhe des Rechtecks.
  • R ist das Rechteck mit durch den TRect-Typ angegebenen Koordinaten.
  • Normalize legt fest, wie ein normalisiertes Rechteck erstellt wird.
Hinweis: Create(const Origin: TPoint) erstellt ein leeres Rechteck an dem angegebenen Ursprung (Origin).

Siehe auch