Home | Trees | Indices | Help |
|
---|
|
Pygame/SDL/OpenGL based sprite engine.
Pygame-based sprite engine for doing real-time graphics during behavioral/neurophysiological experiments.
Author -- James A. Mazer (mazerj@gmail.com)
Classes | |
FrameBuffer | |
ScaledSprite | |
Sprite Sprite object (wrapper for pygame surface class). |
|
PolySprite Sprite-like Polygon. |
|
TextSprite Sprite-like Text object. |
|
MovieDecoder | |
DisplayList Sprite-list manager. |
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
GLASS = 0, 0, 0, 0
|
|
WHITE = 255, 255, 255
|
|
BLACK = 1, 1, 1
|
|
RED = 255, 1, 1
|
|
GREEN = 1, 255, 1
|
|
BLUE = 1, 1, 255, 1
|
|
YELLOW = 255, 255, 1
|
|
MAGENTA = 255, 1, 255
|
|
CYAN = 1, 255, 255
|
Function Details |
Generate two arrays descripting sprite x- and y-coordinate axes (like Matlab MESHGRID). NB By default the coordinate system is matrix/matlab, which means that negative values are at the top of the sprite and increase going down the screen. This is fine if all you use the function for is to compute eccentricity to shaping envelopes, but wrong for most math. Use inverty=1 to get proper world coords.. Mon Mar 3 13:24:10 2014 mazer NOTE: there was a small fencpost error here (I think) -- linspace is right, arange is likely wrong: >> x = np.arange(0, w) - ((w - 1) / 2.0) >> y = np.arange(0, h) - ((h - 1) / 2.0)
|
Improved C() -- converts argument to RGBA color in useful way. By default generates values 0-255, but normal keyword is True, colors are assumed to be specified/generated on the range [0-1].
|
Color specification/normalization Takes number of similar color specifications and tries to convert them all into a common format compatible with pygame, that is a length 4 tuple: (red, green, blue, alpha) where the values vary [0-255], where: 0=off/transparent and 255=on/opaque.
|
Make a bar (creates new sprite). Front end for the Sprite instantiation method. This makes a sprite of the specificed width and hight, fills with the specified color (or noise) and rotates the sprite to the specified angle. This really should be a class that inherits from Sprite().
|
Fixation target sprite generator. Generates a simple sprite containing an "industry standard" fixation target :-) Target is a solid filled circle of the specified color.
|
fancy fixation target sprite generator Generates a sprite containing a circular fixation target surrounded by an annulus of black (to increase detectability).
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Nov 17 00:22:04 2018 | http://epydoc.sourceforge.net |