Forum: Object-Pascal / Delphi-Language
by Uwe Raabe,
1. Feb 2017
Perhaps something like:
if <ScaleX is almost the same as ScaleY> then begin
Result.Width := AControlWidth;
Result.Height := AControlHeight;
end
else begin
< original code >
end;
Forum: Object-Pascal / Delphi-Language
by Uwe Raabe,
1. Feb 2017
Probably because PS does it different.
Forum: Object-Pascal / Delphi-Language
by Uwe Raabe,
1. Feb 2017
1366x768 is not precisely (as in floating precision of your CPU) 16:9. If it were, ScaleX and ScaleY would be equal in your example.
Forum: Object-Pascal / Delphi-Language
by Uwe Raabe,
31. Jan 2017
Seems like you want to keep the aspect ratio of the media when stretching into the control. In that case you will most likely end up with the media not filling the control completely. As the aspect ratio of the media and the control differ slightly, there is not much you can do about it.