System.Types.TRect.Create

De RAD Studio API Documentation
Aller à : navigation, rechercher

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 x, y with width and height
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 {

Propriétés

Type Visibilité  Source Unité  Parent
constructor public
System.Types.pas
SystemTypes.h
System.Types TRect


Description

Crée un rectangle TRect.

Utilisez Create pour construire et initialiser un nouveau rectangle TRect avec les coordonnées Integer suivantes :

  • Origin et P1 représentent le coin supérieur gauche du rectangle sous forme de point de type TPoint.
  • P2 représente le coin inférieur droit du rectangle sous forme de point de type TPoint.
  • Top, Bottom, Right et Left sont les coordonnées de type Integer verticales ou horizontales représentant respectivement les côtés supérieur, inférieur, droit et gauche du rectangle.
  • Width et Height représentent respectivement la largeur et la hauteur de type Integer du rectangle.
  • R représente le rectangle avec des coordonnées spécifiées en utilisant le type TRect.
  • Normalize indique la création d'un rectangle normalisé.
Remarque : Create(const Origin: TPoint) crée un rectangle vide à l'origine spécifiée.

Voir aussi