FMX.InertialMovement.TRectD

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

Delphi

  TRectD = record
    Left, Top, Right, Bottom: Double;
  private
    function GetHeight: Double;
    function GetWidth: Double;
    procedure SetHeight(const Value: Double);
    procedure SetWidth(const Value: Double);
    function GetTopLeft: TPointD;
    procedure SetTopLeft(const P: TPointD);
    function GetBottomRight: TPointD;
    procedure SetBottomRight(const P: TPointD);
  public
    constructor Create(const Origin: TPointD); overload;
    constructor Create(const Left, Top, Right, Bottom: Double); overload;
    class operator Equal(const Lhs, Rhs: TRectD): Boolean;
    class operator NotEqual(const Lhs, Rhs: TRectD): Boolean;
    class function Empty: TRectD; inline; static;
    property Width: Double read GetWidth write SetWidth;
    property Height: Double read GetHeight write SetHeight;
    procedure Inflate(const DX, DY: Double);
    procedure Offset(const DX, DY: Double);
    property TopLeft: TPointD read GetTopLeft write SetTopLeft;
    property BottomRight: TPointD read GetBottomRight write SetBottomRight;
  end;

C++

struct DECLSPEC_DRECORD TRectD
{
public:
    double Left;
    double Top;
    double Right;
    double Bottom;
private:
    double __fastcall GetHeight();
    double __fastcall GetWidth();
    void __fastcall SetHeight(const double Value);
    void __fastcall SetWidth(const double Value);
    TPointD __fastcall GetTopLeft();
    void __fastcall SetTopLeft(const TPointD &P);
    TPointD __fastcall GetBottomRight();
    void __fastcall SetBottomRight(const TPointD &P);
public:
    __fastcall TRectD(const TPointD &Origin)/* overload */;
    __fastcall TRectD(const double Left, const double Top, const double Right, const double Bottom)/* overload */;
    static bool __fastcall _op_Equality(const TRectD &Lhs, const TRectD &Rhs);
    static bool __fastcall _op_Inequality(const TRectD &Lhs, const TRectD &Rhs);
    static TRectD __fastcall Empty();
    __property double Width = {read=GetWidth, write=SetWidth};
    __property double Height = {read=GetHeight, write=SetHeight};
    void __fastcall Inflate(const double DX, const double DY);
    void __fastcall Offset(const double DX, const double DY);
    __property TPointD TopLeft = {read=GetTopLeft, write=SetTopLeft};
    __property TPointD BottomRight = {read=GetBottomRight, write=SetBottomRight};
    TRectD() {}
    friend bool operator ==(const TRectD &Lhs, const TRectD &Rhs) { return TRectD::_op_Equality(Lhs, Rhs); }
    friend bool operator !=(const TRectD &Lhs, const TRectD &Rhs) { return TRectD::_op_Inequality(Lhs, Rhs); }
};

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
record
struct
public
FMX.InertialMovement.pas
FMX.InertialMovement.hpp
FMX.InertialMovement FMX.InertialMovement

Beschreibung

Legt ein Rechteck mit Koordinaten in logischen Einheiten fest.

TRectD repräsentiert die Position und Dimensionen eines Rechtecks. Die Koordinaten werden entweder als vier einzelne Double-Gleitkommakoordinaten angegeben, die den linken, oberen, rechten und unteren Rand definieren, oder als zwei Punkte, die die Positionen der linken oberen sowie der rechten unteren Ecke angeben.

Typischerweise werden TRectD-Werte, die die Position und Dimensionen darstellen, in dichteunabhängigen Pixeln (DP) (logische Einheiten) gemessen. Der Ursprung des Koordinatensystems befindet sich in der linken oberen Ecke eines Containers. Der Container kann der Bildschirm (Bildschirmkoordinaten) oder der Client-Bereich eines Steuerelements (Client-Koordinaten) sein.

Siehe auch