<div dir="ltr"><div class="gmail_extra">My solution is to define my own TRectI type which can implicitly convert between TRectI <-> TRect. Also I use a TRectF which does the same thing, but with floats as the dimenions ... MyRectInt := TRectI(MyRectFloat); ... There is also TPointI and TPointF ...</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">{ TRectI }</div><div class="gmail_extra"><br></div><div class="gmail_extra">  TRectI = record</div><div class="gmail_extra">  private</div><div class="gmail_extra">    function GetEmpty: Boolean;</div><div class="gmail_extra">    procedure SetTop(Value: Integer);</div><div class="gmail_extra">    procedure SetLeft(Value: Integer);</div><div class="gmail_extra">    function GetRight: Integer;</div><div class="gmail_extra">    procedure SetRight(Value: Integer);</div><div class="gmail_extra">    function GetBottom: Integer;</div><div class="gmail_extra">    procedure SetBottom(Value: Integer);</div><div class="gmail_extra">    function GetSize: TPointI;</div><div class="gmail_extra">    function GetTopLeft: TPointI;</div><div class="gmail_extra">    function GetBottomLeft: TPointI;</div><div class="gmail_extra">    function GetBottomRight: TPointI;</div><div class="gmail_extra">    function GetTopRight: TPointI;</div><div class="gmail_extra">    function GetMidPoint: TPointI;</div><div class="gmail_extra">  public</div><div class="gmail_extra">    X, Y, Width, Height: Integer;</div><div class="gmail_extra">    class operator Implicit(const Value: TRectI): TRect;</div><div class="gmail_extra">    class operator Implicit(const Value: TRect): TRectI;</div><div class="gmail_extra">    class operator Equal(const A, B: TRectI): Boolean;</div><div class="gmail_extra">    class operator NotEqual(const A, B: TRectI): Boolean;</div><div class="gmail_extra">    class function Create: TRectI; overload; static;</div><div class="gmail_extra">    class function Create(Size: TPointI): TRectI; overload; static;</div><div class="gmail_extra">    class function Create(W, H: Integer): TRectI; overload; static;</div><div class="gmail_extra">    class function Create(X, Y, W, H: Integer): TRectI; overload; static;</div><div class="gmail_extra">    function Equals(const Value: TRectI): Boolean;</div><div class="gmail_extra">    function Contains(X, Y: Integer): Boolean; overload;</div><div class="gmail_extra">    function Contains(const P: TPointI): Boolean; overload;</div><div class="gmail_extra">    procedure Center(X, Y: Integer); overload;</div><div class="gmail_extra">    procedure Center(const P: TPointI); overload;</div><div class="gmail_extra">    procedure Inflate(X, Y: Integer); overload;</div><div class="gmail_extra">    procedure Inflate(const P: TPointI); overload;</div><div class="gmail_extra">    procedure Offset(X, Y: Integer); overload;</div><div class="gmail_extra">    procedure Offset(const P: TPointI); overload;</div><div class="gmail_extra">    property Empty: Boolean read GetEmpty;</div><div class="gmail_extra">    property Left: Integer read X write SetLeft;</div><div class="gmail_extra">    property Top: Integer read Y write SetTop;</div><div class="gmail_extra">    property Right: Integer read GetRight write SetRight;</div><div class="gmail_extra">    property Bottom: Integer read GetBottom write SetBottom;</div><div class="gmail_extra">    property Size: TPointI read GetSize;</div><div class="gmail_extra">    property TopLeft: TPointI read GetTopLeft;</div><div class="gmail_extra">    property BottomLeft: TPointI read GetBottomLeft;</div><div class="gmail_extra">    property BottomRight: TPointI read GetBottomRight;</div><div class="gmail_extra">    property TopRight: TPointI read GetTopRight;</div><div class="gmail_extra">    property MidPoint: TPointI read GetMidPoint;</div><div class="gmail_extra">  end;</div><div class="gmail_extra">  PRectI = ^TRectI;</div><div class="gmail_extra"></div></div></div>