Forums Archived

The forums are being archived. See this topic for more information.

Rotating a Surface

Get help and support with Rubygame

Rotating a Surface

Postby tyler » Fri Jul 31, 2009 11:07 pm

I could be wrong (but I couldn't find anything in the docs) is there any way to pick the point around which you rotate a Surface?
tyler
 
Posts: 25
Joined: Sat Feb 28, 2009 6:10 am

Re: Rotating a Surface

Postby jacius » Sat Aug 01, 2009 10:41 pm

No, the rotation is always based around the center of the Surface. This is a limitation of SDL_gfx. I'm considering switching to SPriG, which supports that ability (and some other nice things I'd like to have), but it will probably be at least a month before anything SPriG-based is released. Probably longer. :?

As a workaround in the meantime, you'll have to rotate and then blit to the offset-and-rotated position on a new Surface. Or blit to the offset-but-unrotated position on a Surface and then rotate that, although this option would be slower due to the need to rotate a larger Surface.
User avatar
jacius
Site Admin
 
Posts: 131
Joined: Fri Feb 06, 2009 11:13 pm

Re: Rotating a Surface

Postby tyler » Sat Aug 01, 2009 11:00 pm

Alright, I'll do that instead. Thanks!
tyler
 
Posts: 25
Joined: Sat Feb 28, 2009 6:10 am


Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron