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 | |
---|---|
tuple |
BLACK
|
tuple |
BLUE
|
int |
COLINEAR
|
tuple |
COLORS
|
tuple |
DBLUE
|
tuple |
DGREEN
|
dict |
dirs_cache
|
int |
DONT_INTERSECT
|
tuple |
DRED
|
tuple |
GRAY
|
tuple |
GREEN
|
dict |
image_cache
|
tuple |
LBLUE
|
tuple |
LGRAY
|
tuple |
LGREEN
|
tuple |
LRED
|
tuple |
ORANGE
|
float |
PI
|
float |
PIx2
|
dict |
point_cache
|
tuple |
PURPLE
|
tuple |
RED
|
dict |
sound_cache
|
tuple |
TRANSPARENT
|
tuple |
TRANSPARENT2
|
tuple |
WHITE
|
tuple |
YELLOW
|
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 |
---|
BLACK
|
BLUE
|
COLINEAR
|
COLORS
|
DBLUE
|
DGREEN
|
dirs_cache
|
DONT_INTERSECT
|
DRED
|
GRAY
|
GREEN
|
image_cache
|
LBLUE
|
LGRAY
|
LGREEN
|
LRED
|
ORANGE
|
PI
|
PIx2
|
point_cache
|
PURPLE
|
RED
|
sound_cache
|
TRANSPARENT
|
TRANSPARENT2
|
WHITE
|
YELLOW
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Sun Jan 25 19:10:13 2004 | http://epydoc.sf.net |