Package pygame :: Module sprite :: Class RenderClear
[show private | hide private]
[frames | no frames]

Class RenderClear

object --+    
         |    
     Group --+
             |
            RenderClear

Known Subclasses:
RenderUpdates

a group container that can draw and clear its sprites The RenderClear group is just like a normal group, but it can draw and clear the sprites. Any sprites used in this group must contain member elements named "image" and "rect". These are a pygame Surface and Rect, which are passed to a blit call.
Method Summary
  __init__(self, sprite)
__init__(sprite=()) instance a Group
  __len__(self)
__len__() -> int number of sprites in group (inherited from Group)
a new object with type S, a subtype of T __new__(S, ...)
  __nonzero__(self)
__nonzero__() -> bool ask if group is empty (inherited from Group)
  __repr__(self)
(inherited from Group)
  add(self, sprite)
add(sprite) add sprite to group (inherited from Group)
  add_internal(self, sprite)
(inherited from Group)
  clear(self, surface, bgd)
clear(surface, bgd) erase the previous position of all sprites
  copy(self)
copy() -> Group copy a group with all the same sprites (inherited from Group)
  draw(self, surface)
draw(surface) draw all sprites onto a surface
  empty(self)
empty() remove all sprites (inherited from Group)
  has(self, sprite)
has(sprite) -> bool ask if group has sprite (inherited from Group)
  remove(self, sprite)
remove(sprite) remove sprite from group (inherited from Group)
  remove_internal(self, sprite)
  sprites(self)
sprites() -> iterator return an object to loop over each sprite (inherited from Group)
  update(self, *args)
update(...) call update for all member sprites (inherited from Group)

Method Details

__init__(self, sprite=())
(Constructor)

__init__(sprite=()) instance a Group

You can initialize a group by passing it a sprite or sequence of sprites to be contained.
Overrides:
pygame.sprite.Group.__init__ (inherited documentation)

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

clear(self, surface, bgd)

clear(surface, bgd) erase the previous position of all sprites

Clears the area of all drawn sprites. the bgd argument should be Surface which is the same dimensions as the surface. The bgd can also be a function which gets called with the passed surface and the area to be cleared.

draw(self, surface)

draw(surface) draw all sprites onto a surface

Draws all the sprites onto the given surface.

Generated by Epydoc 1.1 on Sun Jan 25 19:10:12 2004 http://epydoc.sf.net