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

Class RenderUpdates

object --+        
         |        
     Group --+    
             |    
   RenderClear --+
                 |
                RenderUpdates

Known Subclasses:
Multi, SpriteGroup

a sprite group that can draw and clear with update rectangles The RenderUpdates is derived from the RenderClear group and keeps track of all the areas drawn and cleared. It also smartly handles overlapping areas between where a sprite was drawn and cleared when generating the update rectangles.
Method Summary
  __init__(self, sprite)
__init__(sprite=()) instance a Group (inherited from RenderClear)
  __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 (inherited from RenderClear)
  copy(self)
copy() -> Group copy a group with all the same sprites (inherited from Group)
  draw(self, surface)
draw(surface) draw all sprites onto the 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)
(inherited from RenderClear)
  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

__new__(S, ...)

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

draw(self, surface)

draw(surface) draw all sprites onto the surface

Draws all the sprites onto the given surface. It returns a list of rectangles, which should be passed to pygame.display.update()

Generated by Epydoc 1.1 on Sun Nov 30 19:33:13 2003 http://epydoc.sf.net