Image rotate/quality

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
ferhan24badshah
Posts: 35
Joined: Sun Feb 02, 2014 12:20 am

Image rotate/quality

Post by ferhan24badshah » Sat Apr 19, 2014 8:16 pm

I imported a PNG file into my card which is precropped in a way that the upper most part of the actual image borders the top of the PNG file...the lower most part of the actual image borders the bottom of the PNG file...the left and right most part of the actual image borders the left and right of the PNG file. I've animated this image file to fall down from the top of the screen to the bottom of the screen while the image file rotates. I also have different obstacles placed which if the image file makes contact with, a message pops up. I'm using the set command to rotate the image file which woks awesome in terms of it not distorting the quality of the image file but the drawback is that it changes the size of the image file in a way that the upper most part of the actual image does not border the top of the PNG file and the same with the other sides. The rotate command doesn't cause this problem but it distorts the quality of the image big time. Is there any way where I can keep cropping the image file perfectly while using the set command in a way where the top,bottom,right,left part of the actual image is always bordering the image file? This is crucial for coding the interaction points between the actual image and the obstacles. Thanks

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: Image rotate/quality

Post by sefrojones » Sat Apr 19, 2014 9:26 pm

I used the angle property to rotate meteors in a simple game I was messing with a while back. Not sure if this is the answer you need, but The stack is posted in the second to last post at the bottom of this thread:

http://forums.runrev.com/viewtopic.php?f=22&t=19380

I've also uploaded a super simple example here. Again, I'm not sure if this is what you're looking for, but I hope it helps!

--Sefro

edit: the action is in the card script
Attachments
ImageRotate.zip
(2.45 KiB) Downloaded 226 times

ferhan24badshah
Posts: 35
Joined: Sun Feb 02, 2014 12:20 am

Re: Image rotate/quality

Post by ferhan24badshah » Sat Apr 19, 2014 10:12 pm

sefrojonesGAda40 wrote:I used the angle property to rotate meteors in a simple game I was messing with a while back. Not sure if this is the answer you need, but The stack is posted in the second to last post at the bottom of this thread:

http://forums.runrev.com/viewtopic.php?f=22&t=19380

I've also uploaded a super simple example here. Again, I'm not sure if this is what you're looking for, but I hope it helps!

--Sefro

edit: the action is in the card script

Hey Thanks for the response and the file. I actually got that part down but the problem I'm trying to deal with is keeping the image size constantly bordered with the actual picture in the image This is crucial for my project because I'll be dealing with intersections between different objects and I dont want livecode to register an interaction based on the image size if the actual picture is not making contact....I replaced a different image within the file you sent me with the borders on so you can visualize what I'm talking about.
Attachments
ImageRotate.zip
(3.39 KiB) Downloaded 231 times

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: Image rotate/quality

Post by sefrojones » Sun Apr 20, 2014 4:42 am

Hmmm, never noticed that before, as I've never tried to rotate a bordered image before...... Maybe instead of using a border, use a rectangle graphic that doesn't change grouped with the image you want to check for intersections? I'm not too sure, but good luck in your search for a solution!

--sefro

edit: something like this perhaps? the just check for intersections on the relevant image in the group.
Attachments
ImageRotate.zip
(3.46 KiB) Downloaded 226 times

Post Reply