[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Fast Blit with mask
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Fast Blit with mask
- From: Knapp <magick.crow@xxxxxxxxx>
- Date: Sun, 27 Nov 2005 19:23:18 -0800
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Sun, 27 Nov 2005 22:23:20 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=SPp9YELxuYHnvwT52qMDuhpLMqmXWQoI/PetWpJtT7ZZ/sw94vnSz3cVh5v0Ci80tUqxBK3avg3TH9lK8sZH4SLTW9sDkGWH25N3VH3jPhu1E5XMYEiPc4LH4mxNEkgvrhGGZCSDBcGBoHjln8hunblqWQpQ7TYVhylLASvPEDU=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
I need to have 3 surfaces.
A is the main image
B is the mask. This would be a round hole that moves around like
looking through a gun sight on a surface the same size as A.
C would be the screen surface.
In the past I would have B surface be all black and the circle be
white and then AND it with the A surface as I blit it to the screen
within the area the size of a rect of the circle.
How is this best done in pygame?
I have tried many ways but all of it is to slow. It should be simple
to define a rect the size of the circle and AND blit it to the
surface.
Thanks for any help!!
Douglas AKA magick on IRC or magick.crow on the docs.