System.Types.TRect.Create
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 {
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
constructor | public | System.Types.pas SystemTypes.h |
System.Types | TRect |
説明
TRect 四角形を作成します。
Create を使用すると、Integer 座標を持つ新しい TRect 四角形を構築および初期化することができます。
- Origin と P1 は、四角形の左上隅を、TPoint 型の点として表します。
- P2 は、四角形の右下隅を、TPoint 型の点として表します。
- Top、Bottom、Right、Left はそれぞれ、四角形の上下左右の辺の、Integer の垂直または水平の座標です。
- Width および Height はそれぞれ、四角形の Integer の幅および高さです。
- R は、TRect 型を使用して指定される座標を持つ四角形です。
- Normalize は、正規化された四角形を作成することを指定します。
- メモ:
Create(const Origin: TPoint)
は、指定された Origin にある空の四角形を作成します。