Rotating PNG images

Jim Lambert jiml at netrin.com
Mon Mar 5 22:12:18 CET 2018


With the added WAIT this is a bit more fun to look at.
And it checks for angles > 32767.
You get an error if you set the angle of an image to greater than 32767.

local ang

on spin
   repeat forever
      add 13 to ang
      if ang > 32767 then 
         beep
         put 0 into ang
      end if
      set the angle of image 1 to ang
      if the commandKey is down then 
         --set the angle of image 1 to 0
         exit spin
      end if
      wait 0 ticks
   end repeat
end spin

Again this illustrates that setting the angle of an image does not distort the image, whereas rotating an image can distort the image.

Jim Lambert


More information about the use-livecode mailing list