Welcome Guest (Log in)

Angle and Resize an Image

StarStarStarStarStar
Development (22) | Image (14) | Images (14) | Resize (5) | Angle (2) | Image resizing (2) |
General
Expander triangle
  • Author
  • Rating
  • Type
  • Revision
  • Downloaded
  • Updated
  • Paul Hibbert
  • StarStarStarStarStar
  • Stack
  • 6
  • 1299 Times
  • 07 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
Tags
Expander triangle
User Comments
Expander triangle