Package pygsear :: Module Screen :: Class Window
[show private | hide private]
[frames | no frames]

Class Window

Layer --+
        |
       Window


This class interfaces with the Pygame display. By initiating this class, the pygame display in initiated.
Method Summary
  __init__(self, size, full)
Initialize the display window.
  border(self, width, color, left, right, top, bottom)
Draw a border around the screen
  clear(self)
Clear the screen.
  resize(self, size)
Resize the window.
  set_background(self, filename, img, tilename, tile, color)
Set the background image
  set_title(self, title)
Change the window title
  update(self, areas)
Update the pygame display

Method Details

__init__(self, size=None, full=None)
(Constructor)

Initialize the display window.
Parameters:
size - 2-tuple (x, y) specifies the dimensions of window.
full - if True, window is fullscreen (so it's not really a window ;).
Overrides:
pygsear.Screen.Layer.__init__

border(self, width=10, color=(255, 255, 255), left=None, right=None, top=None, bottom=None)

Draw a border around the screen
Overrides:
pygsear.Screen.Layer.border

clear(self)

Clear the screen.

Makes the foreground surface match the background.
Overrides:
pygsear.Screen.Layer.clear

resize(self, size)

Resize the window.

Changes the pygame display mode.

set_background(self, filename=None, img=None, tilename=None, tile=None, color=None)

Set the background image
Overrides:
pygsear.Screen.Layer.set_background

set_title(self, title='pygsear')

Change the window title

update(self, areas=None)

Update the pygame display

This call will update a section (or sections) of the display screen. You must update an area of your display when you change its contents. If passed with no arguments, this will update the entire display surface. If you have many rects that need updating, it is best to combine them into a sequence and pass them all at once. This call will accept a sequence of rectstyle arguments. Any None's in the list will be ignored.
Parameters:
areas - sequence of rects to update, or if None (or no argument is passed) will update the entire screen.

Generated by Epydoc 2.0 on Sat Dec 9 14:11:19 2006 http://epydoc.sf.net