Hi Josep,
function rescale theImgWidth,theImgHeight,theCdWidth,theCdHeight
if theCdWidth/theImgWidth < theCdHeight/theImgHeight then
put theCdWidth / theImgWidth into myRatio
else
put theCdHeight / theImgHeight into myRatio
end if
put theImgWidth * myRatio into myNewWidth
put theImgHeight * myRatio into myNewHeight
return myNewWidth,myNewHeight
end rescale
example:
lock screen
put rescale(<width of image>,<height of image>,<width of image
area>,<height of image area>) into myNewSize
set the width of img x to item 1 of myNewSize
set the height of img x to item 2 of myNewSize
set the loc of img x to <loc of image area>
unlock screen
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
Snapper Screen Recorder 2.1 http://snapper.economy-x-talk.com
If you sent me an e-mail before 21 June and haven't got a reply yet,
please send me a reminder.
On 5 jul 2009, at 10:03, Josep wrote:
Hi,
I need to load at proportional size images inside the image area,
but the
image area have her own size. How can fit the image inside the image
area
changing her width and height?
I'm blocked... :(
Any idea? I search the list but I can't found any...
Salut,
Josep
--
View this message in context:
http://www.nabble.com/Load-images-at-proportional-size-tp24340945p24340945.html
Sent from the Revolution - User mailing list archive at Nabble.com.
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution