LiveResize in 6.7.3 and 7.0.3

Brahmanathaswami brahma at hindu.org
Tue Mar 10 18:28:09 EDT 2015


Years ago Scott Raney once suggested to me that for resizing images: 
make sure your code is not using  a ratio algorithm  that resets in a 
loop, in succession, the height and width.

Instead, use an algorithm that changes the complete rect values with all 
4 params and then the screen update for the change in size is 1/2 the 
time or even orders of magnitude faster... I haven't tested this in a 
long time though...

i.e. if you a drag window, do not do this kind of thing:

set the width of image Y to [whatever]
set the height of image Y tto [whatever]

instead get your values ahead of time
then do this

## pseudo code

put x into width
put y into height

set the rect of img "house" to (0,0,x,y)

might help... but yes, we really need smoother animation at all levels 
of LC.

Swasti Astu, Be Well!
Brahmanathaswami

Kauai's Hindu Monastery
www.HimalayanAcademy.com



J. Landman Gay wrote:
>
> Besides locking the screen, also lock messages. I'd avoid 
> deleting/recreating everything too, it would be better to just resize 
> the existing controls, which is much faster. If that isn't possible 
> for some reason, group as many child controls as possible and delete 
> whole groups. 




More information about the use-livecode mailing list