Changing the angle of an image breaks zoom

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Changing the angle of an image breaks zoom

Post by magice » Sat Jan 19, 2013 1:18 am

I have been working on a simple full screen image viewer as part of another stack. The viewer needs to be able to zoom the image and rotate it 90 degrees either direction. I have written a zoom script that works well with a slider. I tried to use "rotate image" but kept getting an error message that the image was not editable. After a bit of research I found "set angle" and used that to make rotation buttons. The problem is, after I rotate the image, the zoom will no longer work. What changes in an image after its angle is changed that would prevent zooming.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Changing the angle of an image breaks zoom

Post by sturgis » Sat Jan 19, 2013 2:59 am

Does indeed seem that you can't change the size of an angled image. You might need to work with snapshots instead. Angle the image, take a snapshot, then size the snapshot as needed. Keep the original tucked away to use it for a clean source.

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: Changing the angle of an image breaks zoom

Post by magice » Sat Jan 19, 2013 5:04 am

sturgis wrote:Does indeed seem that you can't change the size of an angled image. You might need to work with snapshots instead. Angle the image, take a snapshot, then size the snapshot as needed. Keep the original tucked away to use it for a clean source.
I think you are on to something there. I was hoping for a more direct solution, but that may be how i have to do it.

PBH
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 133
Joined: Sun Feb 20, 2011 4:26 pm
Contact:

Re: Changing the angle of an image breaks zoom

Post by PBH » Mon Feb 04, 2013 9:20 am

I struggled with finding a suitable answer to this too, so I created a sample stack to show the workaround solution and posted it on RevOnline. The file uses snapshots as temp images to show the rotation as Sturgis suggests, it's not perfect, but the script is well commented, so should help anyone trying to achieve the same. Link here… http://revonline2.runrev.com/stack/685/ ... e-an-Image

I hope RunRev will improve this issue in future, I've asked, but if no-one else requests it, they probably won't. :wink:

Paul

Post Reply