[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Rotate image around another point?



On 4/19/07, John Eriksson <john@xxxxxxxxxxxx> wrote:
Wher reading Ulfs answer a little more carefully I thinks that it's just
what he is sugesting. *smile*

Yeah, I was a bit unclear perhaps. If you really want to do make a large picture with a lot of empty space you have to create a clear surface and blit your rotated image onto that. In this way you can do what you describe, but unless you are writing an image editor I don't really see why you want to do that. If you just want to make a rotating sprite you really have to keep track of the "offset" of each image yourself, in this case surrounding transparent pixels are just a waste. I use a crop function to automatically remove such borders, but then you do need to keep track of this in the offset, so that the drawing position is consistent.

Ulf