mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 04:40:54 +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>
|
</element>
|
||||||
<!-- function Visibility: default -->
|
<!-- function Visibility: default -->
|
||||||
<element name="IsRectEmpty">
|
<element name="IsRectEmpty">
|
||||||
<short/>
|
<short>Returns true, if the rectangle is empty</short>
|
||||||
<descr/>
|
<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/>
|
<errors/>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
|
@ -1152,12 +1152,14 @@ end;
|
|||||||
Params: const lprc: TRect
|
Params: const lprc: TRect
|
||||||
Returns: Boolean
|
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;
|
function IsRectEmpty(const ARect: TRect): Boolean;
|
||||||
begin
|
begin
|
||||||
with ARect do
|
with ARect do
|
||||||
Result := (Left = 0) and (Top = 0) and (Right = 0) and (Bottom = 0);
|
Result := (Right <= Left) or (Bottom <= Top);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user