realbasic-nug.de
[Top] [All Lists]

Bild passend in Canvas

To: REALbasic NUG German <realbasic-nug dot de at lists dot realsoftware dot com>
Subject: Bild passend in Canvas
From: Stefan Sicurella <sicurella at onlymac dot de>
Date: Tue, 18 Jan 2005 22:13:42 +0100
Delivered-to: realbasic-nug dot de at lists dot realsoftware dot com
Hi,

ich stehe auf dem Schlauch..

Ich möchte ein Bild passend (also nicht verzerrt) in ein Canvas skalieren.

canvas1.graphics.drawPicture pic,0,0,canvas1.width/faktorx,canvas1.height/ faktory,0,0,pic.width,pic.height

was mir fehlt ist faktorx und faktory, egal wie ich die berechne passt es nicht

Es will mir nicht gelingen.... hat vielleicht jemand ein paar Zeilen code?

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


Gruß

Stefan

<Prev in Thread] Current Thread [Next in Thread>