[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] creating a sprite image in code
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] creating a sprite image in code
- From: Luke Paireepinart <rabidpoobear@xxxxxxxxx>
- Date: Tue, 01 May 2007 16:51:06 -0500
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Tue, 01 May 2007 17:51:41 -0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=df3YQQbjELNI4s60uGf4kBwBCd/ulrgjnelcDaSI8LVM0LoJ2TlK6RZ9T6C6DNaP6ZJMjfPGbgvylf+QuOPj87EqHOozqumxsaXDSR7cpZSvLu1xk+CNXsX4ioHMPfefrlnU4Lek/69IHI++sxzXr9iiFmBU9LM9unn2WexWPPc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=TXVaul6pYBxqzFfkn5Z1dm2wxiZE8H3NgFP/BZsJeROri2LCeZtnIfqGPglAiJZBbbN8eIzkJzkHZ4lYhvQjY32jGjaRAXxF/m3kEQ6zixA3gg4XyFy6u+bXlKQtz4sTitI/y+PRSqY0lLqQErOvYwvyzD6dqtQlLO6so63aSmE=
- In-reply-to: <756F08B0-69F5-46C0-A01A-509AAF51921D@pandora.com>
- References: <848044.24545.qm@web63007.mail.re1.yahoo.com> <756F08B0-69F5-46C0-A01A-509AAF51921D@pandora.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Thunderbird 1.5.0.10 (Windows/20070221)
Casey Duncan wrote:
Here's an example that creates a white circle with diameter "size"
with a transparent background:
[snip sample code]
Also, note that there are functions in pygame.image that allow you to
load images from stringbuffers.
So if you have the image you want already, store it as a stringbuffer
and load it into a surface that way.
(That's an alternative to drawing your images in code like other people
have suggested)
-Luke