[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Rotating an Image about another Point
- To: "pygame-users@xxxxxxxx" <pygame-users@xxxxxxxx>
- Subject: [pygame] Rotating an Image about another Point
- From: "Ian Mallett" <geometrian@xxxxxxxxx>
- Date: Fri, 14 Mar 2008 22:11:51 -0700
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sat, 15 Mar 2008 01:12:19 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=GtFIcXAZEoJnYgKW4TQU8TgIC9BH9BfwxG09Fas1Xiw=; b=g1LbHA+mZl0Yc2/1bxyOJ0DaaSFYLOQrIu3OS794Oc3sruyq1KadzjhnWOuvTBUw/Qp3PMugxkVxsxZQyDuNEbcAwtEwX5pgMMGVP2r2nfHnG/flVwFuaiwviZjozem632UXmLefcuX8xbBvxDNicLw9Vs1/wO7ZIbAB+sMNaTc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=BQ9coH1KiwJ/fzk1LL8fzBSC/eLdrlE3b2oR7FJKIUD60KtpCgKLYuseP7X0TpZiQJx2FPW9cprz2+AY6ObyJ9UslAlcu0q22MiPEltmw4DShhPQNy6i87Vn/FkeiZJDEzWovtK8eoze49MHTwJ2n/lp+8vk8Pr03sKLVKYWQ+E=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi,
The story so far:
-I looked for this, and Google turned up some stuff which I didn't understand.
-It seemed to provide code to rotate a point about another, which I already know how to do.
-pygame.transform.rotate() rotates the image about its center, returning a larger or smaller surface.
-What I need is to rotate the surface about another point.
-I'm guessing this is impossible with pygame.transform.rotate(), and anyway, this causes more complications. So, since the rotated surface will be blitted somewhere, the image will appear to rotate around a point if the blitting point moves correctly. Specifically, I would like to move the blitting point to a location such that, for any rotation, the image appears to rotate around its bottom edge.
-How can one do that?
Thanks,
Ian