Scale to fit

MisterX b.xavier at internet.lu
Tue Oct 11 01:32:19 EDT 2005


grab the maximum of the images's width or height.

Get the ratio of W/H

Set the rect to it's new size and insure that the
maxima recorded before is set. Then use the ratio
to resize the other side (which was not the maximum).

that usually does it...

if you want a script, I can post one later tonite...

cheers
Xavier

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Todd Geist
> Sent: Tuesday, October 11, 2005 7:14 AM
> To: use-revolution at lists.runrev.com
> Subject: Re: Scale to fit
> 
> Thanks for this tip
> 
> Now I want to go one step further. I want it to scale but to 
> maintain it's original proportions.  Is there an easy way to do that?
> 
> 
> On 10/10/05 3:26 PM, "David Burgun" <dburgun at dsl.pipex.com> wrote:
> 
> > To rescale, just set a new rect as in:
> > 
> > put 100,100,300,400 into myRect
> > set the rect of image "X" to myRect
> 
> Thanks
> 
> Todd
> 
> 
> -- 
> 
> Todd Geist
> ______________________________________
> g e i s t   i n t e r a c t i v e 
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage 
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list