Can't Change the Size of an Image on an Angle

Ray ray at linkit.com
Thu Oct 31 17:42:33 CET 2013


Paul,

Just to let you know, the snapshot idea worked out really well for me.  
It's a little tricky since you have to constantly monitor how setting 
the angle of an image with LockLoc set to false changes the image's 
width and height but with a little attention paid to this, the snapshot 
idea works well.

Thanks,

Ray

On 10/30/2013 6:39 PM, Paul Hibbert wrote:
> Ray,
>
> I had a similar problem and worked my way through to find a solution, then I posted the stack to revOnline, it's not perfect, but it may help, here's the link…
>
> http://livecodeshare.runrev.com/stack/685/Angle-and-Resize-an-Image
>
> …or search for "Angle and Resize an Image" in the User Samples from LC.
>
> Hope it saves you some frustration.
>
> You may wish to add your comments to http://quality.runrev.com/show_bug.cgi?id=9244 and maybe someone will look at the problem again.
>
> Paul
>
>
> On 2013-10-30, at 2:34 PM, Ray <ray at linkit.com> wrote:
>
>> Paul,
>>
>> I'm actually looping through a list of angles, widths and heights. If I set the lockLoc to false I can set the angle to a number of degrees without it getting reduced in size, but then I can't set the width and height.  The other way around (if I set the lockLoc to true) I can then change the width and height after setting the angle, but setting the angle forces a reduction in the size of the image to fit the 'bounding rect' of the image.
>>
>> I think I'm going to have to look into changing the over 'bounding rect' of the image to get this done right.
>>
>> Thanks,
>>
>> Ray
>>
>> On 10/30/2013 5:17 PM, Paul Looney wrote:
>>> Ray,
>>> Not sure this fits your specific situation but I've found in working with images that it is necessary to
>>> set the lockLoc to true immediately after the changes.
>>> Paul Looney
>>>
>>> On Oct 30, 2013, at 2:11 PM, Ray <ray at linkit.com> wrote:
>>>
>>>> It seems that if I set the angle of an image whose lockLoc property is set to false I'm then unable to change the image's size.
>>>>
>>>> on mouseUp
>>>>    set the lockLoc of img "Ant" to false       -- so changing the angle doesn't reduce the image's size
>>>>    set the angle of img "Ant" to 90
>>>>    put the width of img "Ant" into originalWidth
>>>>    set the width of img "Ant" to originalWidth/2       -- has no effect
>>>>    put the result into myResult -- nothing is returned here
>>>> end mouseUp
>>>>
>>>> Does anybody have a work around for this?
>>>>
>>>> Much appreciated,
>>>>
>>>> Ray Horsley
>>>> LinkIt! Software
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list