[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] rotating problem



Michael wrote:
> I want to rotate a surface in-place clipping anything that would be
> outside the original rect and keeping the original colorkey and so forth.
> I think this will make a 'rolling stone' sprite work the way I want.
> Currently if I try to rotate the stone as it moves it gets the effect of
> bouncing which is not what I want. This happens even if I center. The
> original image is dead center and perfectly round so it isn't the image
> causing the bounce effect. Any suggestions are appreciated. Thanks.

What I would do is use surface.set_clip to clip to the rectangle you want to 
blit to, blit the image, and then turn off clipping or set it to the next 
rect that you want to clip.

Check out:
http://pygame.org/docs/ref/Surface.html#set_clip

B
-- 
*  tgz@orotech.net  *  http://clickass.org  *  ICQ# 1107012  *  AIM/Yahoo: 
theGREENzebra  *  http://mp3.com/thegreenzebra
-----GEEK CODE 3.12-----
GCM/CS/IT/MU d? s: a22 C++++ UL++++ P+ L+++>$ E---- W++ N+ o K- w---$ O- M 
V-- PS+ PE Y+ PGP- t++(+++) 5- X R tv(+) b+(-) DI+++ D+ G++ e h++ r+(---) y+ 
UF*++

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org