so, das hier schient zu funktionieren:
Delphi-Quellcode:
function getfactor(horig,worig,hmax,wmax:integer):real;
var factor:real;
begin
//i have got the dimensions of the bitmap and the one
//of the canvas. so now i need the scale factor to get the
//bitmap into the canvas.
factor:= wmax/worig;
if horig * factor > hmax then
factor := hmax/horig;
result:=factor;
//not optimal, but should do it for now
end;
das problem ist allerdings die skalierungsfunktion.....
Lukas Erlacher
Suche Grafiktablett. Spenden/Gebrauchtangebote willkommen.
Gotteskrieger gesucht!
For it is the chief characteristic of the religion of science that it works. - Isaac Asimov, Foundation I, Buch 1