Index

Pygame Sources

You can create a mousetrap from a Pygame surface through the Mousetrap module method by passing a pygame surface object in as source, the first parameter.

If the source_flags parameter is set to pygame_flags['IGNORE_COLORKEY'] the pygame surface transparency is not used to create the new mousetrap, it is opaque.
If source_flags is 0, the pygame surface is processed and any transparent pixels in the surface end up as transparent in the resulting mousetrap.

The source parameter is the pygame surface you wish to make a mousetrap object out of. The resulting mousetrap is created with the dimensions of the pygame surface.


Copyright © 2001 Ben Smith