mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 13:09:16 +02:00
* Patch from Eric Grange to fix TRectF.FitInto
This commit is contained in:
parent
d2f5bbac50
commit
28fc3da2bd
@ -1701,8 +1701,9 @@ begin
|
||||
exit(Self);
|
||||
Result.Width:=Self.Width / Ratio;
|
||||
Result.Height:=Self.Height / Ratio;
|
||||
Result.Left:=Self.Left + (Self.Width - Result.Width) / 2;
|
||||
Result.Top:=Self.Top + (Self.Height - Result.Height) / 2;
|
||||
// Center the result within the Dest rectangle
|
||||
Result.Left:=Dest.Left + (Dest.Width - Result.Width) / 2;
|
||||
Result.Top:=Dest.Top + (Dest.Height - Result.Height) / 2;
|
||||
end;
|
||||
|
||||
function TRectF.FitInto(const Dest: TRectF): TRectF;
|
||||
|
Loading…
Reference in New Issue
Block a user