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

## Class Layer

Known Subclasses:
  `Layer`, `Window`

Holds foreground and background pygame surfaces

Method Summary
| `__init__(self, size)`
| ``border`(self, width, color, left, right, top, bottom)` Draw a border around the screen
| ``clear`(self)` Clear the screen.
| ``set_background`(self, filename, img, tilename, tile, color)` Set the background.

Method Details

### border(self, width=10, color=(255, 255, 255), left=None, right=None, top=None, bottom=None) Draw a border around the screen Each border width can be specified separately, or if not specified, will default to using width. Specify width of 0 for no border on a particular side. Parameters: `width` - Pixel width of border. If only width is passed, an equal width border will be drawn around the entire screen. `color` - Color of border. `left` - Left-side border width. `right` - Right-side border width. `top` - Top-side border width. `bottom` - Bottom-side border width

### clear(self) Clear the screen. Makes the foreground surface match the background.

### set_background(self, filename=None, img=None, tilename=None, tile=None, color=None) Set the background. Must include just one of the keyword args: `set_background(filename)` (filename is a string) full size background image, should fill the screen `set_background(img)` (img is a pygame Surface) full size background image, should fill the screen `set_background(tilename)` (filename is a string) image tile will fill screen automatically `set_background(tile)` (tile is a pygame Surface) image tile will fill screen automatically `set_background(color=(R, G, B))` background will be filled with color (an RGB tuple) Parameters: `filename` - Name of the full-screen background image. `img` - Full-screen background image. (pygame Surface) `tilename` - Name of tile image. `tile` - Tile image. (pygame Surface) `color` - Solid background color.

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