1
Graphics / Re: Rotating sprite around its center AND resizing it
« on: April 07, 2012, 09:46:46 pm »
Thanks -- I realize that makes more sense now. I've looked around the forum and some other places and most people seem to use (or imply they use) sprite.SetCenter( sprite.GetSize() / 2.f ), which would work only if the sprite has not been resized already. Maybe it's better to use:
Thanks again!
Code: [Select]
if( sprite.GetImage() )
sprite.SetCenter( sprite.GetImage()->GetWidth / 2, sprite.GetImage()->GetHeight / 2 )
because it will work regardless of when the image was resized?Thanks again!