LCL: Add a wrapper for Types.OffsetRect() into LCLIntf.

This commit is contained in:
Juha 2023-06-07 00:38:55 +03:00
parent 10368c0b02
commit f3afdc8d50
2 changed files with 17 additions and 0 deletions

View File

@ -1516,6 +1516,20 @@ begin
Result := MakeLong(l, h);
end;
{------------------------------------------------------------------------------
Function: OffsetRect
Params: Rect: points to structure that moves.
dx : amount to move the rect to left or right. Must be negative to move to left.
dy : amount to move the rect up or down. Mmust be negative to move up.
Returns: True if succesful
Moves the rectangle up or down, left or right.
------------------------------------------------------------------------------}
function OffsetRect(var Rect: TRect; dx,dy: Integer): Boolean;
begin
Result:=Types.OffsetRect(Rect,dx,dy);
end;
{------------------------------------------------------------------------------
Function: PointtoSmallPoint
Params:

View File

@ -336,6 +336,9 @@ function MakeWParam(l, h: Word): WPARAM; inline;
function MakeLParam(l, h: Word): LPARAM; inline;
function MakeLResult(l, h: Word): LRESULT; inline;
// Deprecated in version 2.3, 2023-06.
function OffsetRect(var Rect: TRect; dx,dy: Integer): Boolean; deprecated 'Use Types.OffsetRect instead';
function PtInRect(const Rect : TRect; const Point : TPoint) : Boolean; inline;
function PointToSmallPoint(const P : TPoint) : TSmallPoint; inline;
function PointToSmallPointNoChecks(const P : TPoint) : TSmallPoint; inline;