Welcome Guest (Log in)

Angle and Resize an Image

Development (24) | Images (13) | Resize (5) | Image (4) |
Expander triangle
  • Author
  • Rating
  • Type
  • Revision
  • Downloaded
  • Updated
  • Paul Hibbert
  • StarStarStarStarStar
  • Stack
  • 6
  • 2078 Times
  • 06 February 2018
Workaround to set the Angle and Scale of an image interactively
This stack demonstrates one method of controlling the scale and angle of an image.

The image scale and angle are both adjustable using the sliders. There is a Reset button to quickly return the image back to its normal state and a 'Lock Image' checkBox for feedback.

There is currently a problem trying to achieve this in LiveCode, whereby, if you set the angle first, then scale the image it works fine, but if you scale the image first and then adjust the angle, the image reverts to its original size, hence the need for a workaround.

The scripts are well commented. You are free to use any of this code if it helps your project.

The code is not perfect and could be improved upon. If anybody has a better idea or suggestion please let me know. I would be very interested to hear any other way to achieve this.

Version 4 has an improved scale script for more accurate results.

Version 5 is adjusted slightly for LC 7

Version 6. Found an odd bug in LC 9, fixed by moving a small script to the stack script.
Ajax Loader
Expander triangle
User Comments
Expander triangle