mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 04:09:30 +02:00
LCL: made IsEmptyRect winapi compatible, Rect(0,0,0,0) is just an example of an empty rect (bug #9495)
git-svn-id: trunk@11859 -
This commit is contained in:
parent
04a5b4539c
commit
c01e381286
@ -3649,8 +3649,12 @@
|
||||
</element>
|
||||
<!-- function Visibility: default -->
|
||||
<element name="IsRectEmpty">
|
||||
<short/>
|
||||
<descr/>
|
||||
<short>Returns true, if the rectangle is empty</short>
|
||||
<descr>IsEmptyRect returns true, if the area of the rectangle described by ARect is empty,
|
||||
i.e. right coordinate is less than or equal to the left coordinate,
|
||||
or the bottom coordinate is less than or equal to the top coordinate
|
||||
|
||||
</descr>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
</element>
|
||||
|
@ -1152,12 +1152,14 @@ end;
|
||||
Params: const lprc: TRect
|
||||
Returns: Boolean
|
||||
|
||||
Returns true if ARect is (0,0,0,0)
|
||||
Returns true if ARect is the area of the rectangle is empty,
|
||||
i.e. right coordinate is less than or equal to the left coordinate,
|
||||
or the bottom coordinate is less than or equal to the top coordinate
|
||||
------------------------------------------------------------------------------}
|
||||
function IsRectEmpty(const ARect: TRect): Boolean;
|
||||
begin
|
||||
with ARect do
|
||||
Result := (Left = 0) and (Top = 0) and (Right = 0) and (Bottom = 0);
|
||||
Result := (Right <= Left) or (Bottom <= Top);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user