Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: TheMagician on Sat 26/11/2005 15:36:21

Title: Cropped sprite after DynamicSprite.Rotate
Post by: TheMagician on Sat 26/11/2005 15:36:21
Hi everybody!

I have a square sprite 57x57 pixel.
I turn it into a dynamic sprite and rotate it clockwise 90 degrees.

Unfortunately the sprite gets cropped one pixel at the left side.
This happens even if I tell the program (through the optional parameters in the Rotate function) that the rotated sprite should be 57x57 in size.

The problem is, I need a pixel perfect rotation for one of my puzzles.

Is the problem caused because the sprite has an odd number of pixels?

Thanks in advance,
Stefan
Title: Re: Cropped sprite after DynamicSprite.Rotate
Post by: Babar on Sat 26/11/2005 16:30:23
Perhaps. You using 640x400?
Title: Re: Cropped sprite after DynamicSprite.Rotate
Post by: Rui 'Trovatore' Pires on Sat 26/11/2005 17:03:23
Not the best of solutions, but you could instead specify that the rotated sprite be 58x58, and see if it helps. Wouldn't be pixel-perfect, but it'd be damn near.

Or you could change your sprite to have an even number of pixels-per-pixels. I know it's not very helpful, but if you are indeed using 640x400, there's little or no alternative.
Title: Re: Cropped sprite after DynamicSprite.Rotate
Post by: TheMagician on Sat 26/11/2005 18:18:36
Well, I'm using 320x240.

And changing the rotated sprite to 58x58 solves the problem but even this almost-pixel-perfect solution isn't enough for the puzzle.

Well, I guess I'll draw all the parts again one pixel wider.

Thanks for your answers!
Stefan