Jump to content
  • Advertisement
Sign in to follow this  
Lobosque

[SDL] Image moving when rotating with sdl_gfx

This topic is 3325 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys, i'm having a problem... I trying to rotate a image with sdl_gfx but it "moves" a little when rotate. I think it happens because when rotated, the image gets bigger, so i used D = 128*cos(30) + 128*sin(30) - 128 where 128 is the width of the square and 30 is the angle used to rotate (of course i used 30*PI/180 in the code. D is the difference between the side of the new and the old square. But it is wrong! can someone point me in the right direction? Here is a image to show what i tought: http://img11.imageshack.us/img11/804/examplet.png [Edited by - Lobosque on April 17, 2009 10:44:34 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!