Page 1 of 1

Move and zoom at same time?

Posted: Sun Jun 25, 2017 7:06 pm
by Bugala
What I want to happen is that I have layer of size 200x200 on x=1, y=1.

Then I want it to move to location x=1000, y=1000 and change its size to 100x100 along the way.

I can use command "MoveLayer" to move it nice and smooth, but is it possible to also at same time have it change its size when it moves towards its target, or do I have to code it myself to make it do it?

Re: Move and zoom at same time?

Posted: Tue Jun 27, 2017 5:42 pm
by airsoftsoftwair
You can use SetLayerStyle() to apply multiple property changes at once.

Re: Move and zoom at same time?

Posted: Tue Jun 27, 2017 6:03 pm
by Bugala
Thanks from answer, but what i was after is that by using MoveLayer, i only need to write one line of code and get nice smooth movement from one place to another, while using setlayerstyle, i already need to make a loop.

What I meant to ask is if there is some way to move and zoom at same time, without needing to use a loop.

But anyway, even that setlayerstyle already helps, for it didnt occur to my mind before that i could use that to do it if i have to use loop.

Re: Move and zoom at same time?

Posted: Sat Jul 01, 2017 10:16 pm
by airsoftsoftwair
Bugala wrote:What I meant to ask is if there is some way to move and zoom at same time, without needing to use a loop.
Oh well, that's not possible I'm afraid. Use a loop.