summaryrefslogtreecommitdiff
path: root/prototypes/fpgui2/tests/uhelpers.pas
blob: b7c65345ebaf0bd34d1614b3c11258752ee5916b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
unit uhelpers;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils; 


function InflateRect(var Rect: TRect; dx: Integer; dy: Integer): Boolean;

implementation

function InflateRect(var Rect: TRect; dx: Integer; dy: Integer): Boolean;
begin
  if Assigned(@Rect) then
  begin
    with Rect do
    begin
      dec(Left, dx);
      dec(Top, dy);
      inc(Right, dx);
      inc(Bottom, dy);
    end;
    Result := True;
  end
  else
    Result := False;
end;


end.