Hmmm seems something like the following should do it...

This following chunk doesn't take into account that aspect
ratios need to be allowed for in choosing the largest dimension
and that aspect correction needs to be allowed for if Source and
Destination have differing aspect ratios.

if Source.X>Source.Y then begin
  Dest.X := Frame.X;
  Dest.Y := Source.Y*(Dest.X/Source.X);
end
else begin
  Dest.Y := Frame.Y;
  Dest.X := Source.X*(Dest.Y/Source.Y);
end;

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to