Setting Angle Of Image

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Location: Maryland, USA
Contact:

Setting Angle Of Image

Post by Nonsanity » Sun May 11, 2008 5:01 pm

I'm getting awful results when trying to rotate images. In this case, the rectangular image's source file is larger than I'm displaying it. I set a new, smaller width and height after loading it. Then during operation of the stack, the image can be rotated 90 degrees and back at any time.

Setting the angle causes the image to revert to full size. Immediately setting the smaller size again (with width and height swapped for the rotation) doesn't do anything.

The only way I seem to be able to get the scaled down image rotated 90 degrees is to set the locklocation to true, then set the angle. But then, the image is the same shape, even though the image is rotated (and squashed/stretched).

So then I set the new height and width for the rotated shape, and hooray! It looks right, finally.

But then I move the stack to another computer and run it with the player... And it DOESN'T work. :(

Anyone have a good work-around for dealing with rotated images?
~ Nonsanity
~ Chris Innanen

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Location: Kent, UK
Contact:

Post by gyroscope » Thu May 15, 2008 12:10 am

Hi Nonsanity: can't help you with your prob of nailing resized and angled images down on different machines but I would be bold enough to suggest there's a bug lurking about somewhere there.

The reason I say that is when I experimented with angled images, a jagged black box appears around the perimeter of them (jpeg or png) at all angles except 45, 90,180 degree rotation.

Have you had this prob as well?

:)

Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Location: Maryland, USA
Contact:

Post by Nonsanity » Thu May 15, 2008 12:22 am

I hadn't been doing any angles other than 0 and 90, but I just rotated one by 27 and indeed the new empty space around the rotated image is black. That color might be adjustable somewhere. It might also be possible to mask out that background if transparency was required.

But given the crazy results of changing angle that I had, I wouldn't do anything with that property at all. I've already changed my code to use something else instead of angle. I don't plan on touching it again any time soon.

(Unless something is fixed or a workaround is suggested. :))
~ Nonsanity
~ Chris Innanen

Post Reply

Return to “Multimedia”