Hi,
super, danke, so klappt es.
Ich muss das Bild als Backdrop rein malen sonst wird es bei jeder
Aktion gelöscht...
Gruß
Stefan
Ich möchte ein Bild passend (also nicht verzerrt) in ein Canvas
skalieren.
was mir fehlt ist faktorx und faktory, egal wie ich die berechne
passt es nicht
faktor=min(canvas1.width/pic.width, canvas1.height/pic.height)
canvas1.graphics.drawPicture
pic,0,0,pic.width*faktor,pic.height*faktor,0,0,pic.width,pic.height
aus dem Kopf...
Außerdem stürzt bei mir RB ab bei folgendem Code:
canvas1.backdrop.graphics.drawPicture
pic,0,0,canvas1.width/faktorx,canvas1.height/
faktory,0,0,pic.width,pic.height
Keine Ahnung. Vielleicht kann man in das Graphics-Objekt das Backdrop
nichts reinmalen. Evtl. geht nur canvas1.backdrop=mypicture ??
Grüße,
Andreas Bernhardt
|