rotating an image at the center point of the stack
Posted: Wed Mar 11, 2015 2:09 pm
Apparently my brain is to twisted by this problem to create a mathematical solution as I have now spent close to 4 hours coding and recoding. I have a referenced image in a stack that is larger than the stack. It can be dragged around as needed to view any part of the image. I want to rotate the image with the portion of the image at stack center staying at stack center. The following code seems like it should work but it doesn't
What am I missing?
Code: Select all
on mouseUp
put (the width of this stack/2) into tHCen
put (the height of this stack/2) into tVCen
put (the bottom of img "image"- tVCen) into tVOff
put (the right of img "Image" - tHCen) into tHOff
set the angle of img "image" to (the angle of img "image"+90)
set the top of img "image" to tVCen - tHOff
set the right of img "image" to tHCen + tVOff
end mouseUp