# Can one manually resize an object proportionately?

Malte Brill revolution at derbrill.de
Sat Apr 9 15:09:37 EDT 2005


Hi Steve,

 >Although one can go into the Revolution property inspector and do some
 >calculation to resize an object proportionately, e.g. to say 1/3 the 
size, when
 >trying to do this manually I do not see a way to control the resizing
 >proportionately.

You can easiely write a function to do it and do your resizing with the 
messageBox.

If you like to take a look at libRMC (a small Multimedia Library I 
wrote) you can save a bit of work. :-)

You will need to put the stack in the messagepath (start using stack 
"libRMC")

If you want to find out what other features it offers type

libRMCInfo

  into the messagebox.

 From the docs:

aspectScale left,top,right,bottom[,setLockLoc]

set the aspectScale of img "myImage" to 100,100,400,400,true
set the aspectScale of fld "myField" to the rect of grc "myGraphic"

setting the aspectScale of a control scales it in the correct 
width-to-height ratio to the biggest dimensions possible to fit in the 
specified rectangle. you can specify if the lockLoc of the control 
should be set to avoid unwanted resizing when closing/reopening cards.


You find the library here:

http://www.derbrill.de/librmc/libRMC.rev.zip

The docs:

http://www.derbrill.de/librmc/docs.pdf

Cheers,

Malte


More information about the use-livecode mailing list