Coming from Delphi and back to Lazarus there is one little niggly thing bothering me.
In Delphi when accessing a TRect you have available functions such as
R.Height and
R.Width as well as
IsRectEmpty for example.
In Lazarus however there only appears to be access to the Top, Right, Bottom of the rect etc.
Coding this yourself is not particularly difficult however, for example:
function GetRectHeight(ARect: TRect): Integer;
begin
Result := ARect.Bottom + ARect.Top;
end;
function GetRectWidth(ARect: TRect): Integer;
begin
Result := ARect.Left + ARect.Right;
end;
function RectEmpty(ARect: TRect): Boolean;
begin
Result := (ARect.Right <= ARect.Left) or (ARect.Bottom <= ARect.Top);
end;
I guess I was hoping for a built-in solution if there exists one?