Home | Trees | Index | Help |
---|
Package pygsear :: Module Util |
|
Exceptions | |
---|---|
TextRectException |
Function Summary | |
---|---|
beep()
| |
color(name,
modifier)
| |
color_darken(color)
| |
color_lighten(color)
| |
does_surface_have_pixel_alpha(surface)
| |
return a list of potential data directories. | |
return the first existing file found in dirs. | |
return True if both integers have the same signs. | |
return True if 2 line segments intersect. | |
Return pygame surface from filename string. | |
Return list of pygame surfaces. | |
Return dict of filename: image pygame surfaces. | |
Return list of points (x, y) . | |
Return pygame sound object. | |
Returns a surface containing the passed text. | |
return a scaled copy of a pygame.Surface |
Variable Summary | |
---|---|
int |
COLINEAR = -1 |
dict |
dirs_cache = {}
|
int |
DONT_INTERSECT = 0 |
dict |
image_cache = {}
|
dict |
point_cache = {}
|
dict |
sound_cache = {}
|
Function Details |
---|
get_dirs(type=None)return a list of potential data directories. Looks around at possible locations, and returns possible data directories in this order:
|
get_full_path(filename, dirs)return the first existing file found in dirs.
|
have_same_signs(a, b)return True if both integers have the same signs.
|
line_seg_intersect(line1point1, line1point2, line2point1, line2point2)return True if 2 line segments intersect.
|
load_image(filename, convert=1)Return pygame surface from filename string. Usesget_dirs to know where to look for the
file.
|
load_images(filenames=None, dirname=None, convert=1)Return list of pygame surfaces. Must pass either list of filenames, or name of directory from which to load all images. Usesget_dirs to know where to look for the
file or directory.
|
load_images_dict(filenames=None, dirname=None, convert=1)Return dict of Must pass either a list of filenames or the name of a directory from which to load all images. Usesget_dirs to know where to look for the
file or directory.
|
load_points(filename)Return list of points(x, y) .
|
load_sound(filename)Return pygame sound object. Sound file shoud be a pygsear.Sound.DummySound objects instead
of actual pygame.mixer.Sound objects.
|
render_textrect(string, rect, text_color=(255, 255, 255), bgcolor=(0, 0, 0), fontSize=20, justification=0, trim=0)Returns a surface containing the passed text. The text string will be reformatted to fit within the given rect, word-wrapping as necessary. The text will be anti-aliased. Raises aTextRectException if the text won't fit onto
the surface.
|
scale_image(img, width, height, keepAspectRatio=1)return a scaled copy of apygame.Surface
|
Variable Details |
---|
COLINEAR
|
dirs_cache
|
DONT_INTERSECT
|
image_cache
|
point_cache
|
sound_cache
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Sat Dec 9 14:11:20 2006 | http://epydoc.sf.net |