Lenard Lindstrom avatar Lenard Lindstrom committed ebd5456

merging with python3 branch r 2048

Comments (0)

Files changed (67)

 # BUG    = fixed a bug that was (or could have been) crashing
 #
 #
+[SVN 2047] May 1, 2009
+    Merge python3 branch back into trunk. This allows a minimal Pygame
+    system to be built for Python 3. It also improves error checking
+    in module init functions.
+
 [SVN 1952] Feb 22, 2009
     Added Surface.scroll method along with the scroll.py example.
 

bdist_mpkg_support.py

 except pkg_resources.DistributionNotFound:
     raise ImportError
 
+try:
+    unicode
+except NameError:
+    def unicode(s):
+        return s
+
 FRAMEWORKS = ['SDL', 'SDL_ttf', 'SDL_image', 'SDL_mixer', 'smpeg']
 
 CUSTOM_SCHEMES = dict(
     examples=dict(
-        description=u'(Optional) pygame example code',
+        description=unicode('(Optional) pygame example code'),
         prefix='/Developer/Python/pygame/Examples',
         source='examples',
     ),
     docs=dict(
-        description=u'(Optional) pygame documentation',
+        description=unicode('(Optional) pygame documentation'),
         prefix='/Developer/Python/pygame/Documentation',
         source='docs',
     ),
 
 for framework in FRAMEWORKS:
     CUSTOM_SCHEMES[framework] = dict(
-        description=u'(Required) %s.framework' % (framework,),
+        description=unicode('(Required) %s.framework') % (framework,),
         prefix='/Library/Frameworks/%s.framework' % (framework,),
         source='/Library/Frameworks/%s.framework' % (framework,),
     )
 
 import msysio
 import mingwcfg
-import sys, os, shutil, string
+import sys, os, shutil
 
 def print_(*args, **kwds):
     """Simular to the Python 3.0 print function"""
 def confirm(message):
     "ask a yes/no question, return result"
     reply = msysio.raw_input_("\n%s [Y/n]:" % message)
-    if reply and string.lower(reply[0]) == 'n':
-        return 0
-    return 1
+    if reply and reply[0].lower() == 'n':
+        return False
+    return True
 
 def is_msys_mingw():
     """Return true if this in an MinGW/MSYS build
 
 def main():
     additional_platform_setup = []
-    if sys.platform == 'win32' and not is_msys_mingw():
+    if (sys.platform == 'win32' and
+        # Note that msys builds supported for 2.6 and greater. Use prebuilt.
+        (sys.version_info >= (2, 6) or not is_msys_mingw())):
         print_('Using WINDOWS configuration...\n')
         import config_win as CFG
     elif sys.platform == 'win32':
 """Config on Unix"""
 
-import os, sys, string
+import os, sys
 from glob import glob
 from distutils.sysconfig import get_python_inc
 
+# Python 2.x/3.x compatibility
+try:
+    raw_input
+except NameError:
+    raw_input = input
+
 configcommand = os.environ.get('SDL_CONFIG', 'sdl-config',)
 configcommand = configcommand + ' --version --cflags --libs'
 localbase = os.environ.get('LOCALBASE', '')
 def confirm(message):
     "ask a yes/no question, return result"
     reply = raw_input('\n' + message + ' [Y/n]:')
-    if reply and string.lower(reply[0]) == 'n':
+    if reply and (reply[0].lower()) == 'n':
         return 0
     return 1
 
         self.cflags = ''
         try:
             config = os.popen(command + ' --version --cflags --libs').readlines()
-            flags = string.split(string.join(config[1:], ' '))
+            flags = ' '.join(config[1:]).split()
 
             # remove this GNU_SOURCE if there... since python has it already,
             #   it causes a warning.
             if '-D_GNU_SOURCE=1' in flags:
                 flags.remove('-D_GNU_SOURCE=1')
-            self.ver = string.strip(config[0])
+            self.ver = config[0].strip()
             if minver and self.ver < minver:
                 err= 'WARNING: requires %s version %s (%s found)' % (self.name, self.ver, minver)
-                raise ValueError, err
+                raise ValueError(err)
             self.found = 1
             self.cflags = ''
             for f in flags:
                 elif f[:3] == '-Wl':
                     self.cflags += '-Xlinker ' + f + ' '
             if self.name == 'SDL':
-		inc = '-I' + '/usr/X11R6/include'
-		self.cflags = inc + ' ' + self.cflags
+                inc = '-I' + '/usr/X11R6/include'
+                self.cflags = inc + ' ' + self.cflags
         except:
-            print 'WARNING: "%s" failed!' % command    
+            print ('WARNING: "%s" failed!' % command)
             self.found = 0
             self.ver = '0'
             self.libs = defaultlibs
 
     def configure(self, incdirs, libdir):
         if self.found:
-            print self.name + '        '[len(self.name):] + ': found ' + self.ver
+            print (self.name + '        '[len(self.name):] + ': found ' + self.ver)
             self.found = 1
         else:
-            print self.name + '        '[len(self.name):] + ': not found'
+            print (self.name + '        '[len(self.name):] + ': not found')
 
 class Dependency:
     def __init__(self, name, checkhead, checklib, libs):
     
     def configure(self, incdirs, libdirs):
         incname = self.checkhead
-        libnames = self.checklib, string.lower(self.name)
+        libnames = self.checklib, self.name.lower()
         
         if incname:
             for dir in incdirs:
                     self.lib_dir = dir
 
         if (incname and self.lib_dir and self.inc_dir) or (not incname and self.lib_dir):
-            print self.name + '        '[len(self.name):] + ': found'
+            print (self.name + '        '[len(self.name):] + ': found')
             self.found = 1
         else:
-            print self.name + '        '[len(self.name):] + ': not found'
+            print (self.name + '        '[len(self.name):] + ': not found')
 
 class DependencyPython:
     def __init__(self, name, module, header):
             else:
                 self.inc_dir = os.path.split(fullpath)[0]
         if self.found:
-            print self.name + '        '[len(self.name):] + ': found', self.ver
+            print (self.name + '        '[len(self.name):] + ': found', self.ver)
         else:
-            print self.name + '        '[len(self.name):] + ': not found'
+            print (self.name + '        '[len(self.name):] + ': not found')
 
 sdl_lib_name = 'SDL'
 
 def main():
-    print '\nHunting dependencies...'
+    print ('\nHunting dependencies...')
     DEPS = [
         DependencyProg('SDL', 'SDL_CONFIG', 'sdl-config', '1.2', ['sdl']),
         Dependency('FONT', 'SDL_ttf.h', 'libSDL_ttf.so', ['SDL_ttf']),
         Dependency('PORTTIME', 'porttime.h', 'libporttime.so', ['porttime']),
         #Dependency('GFX', 'SDL_gfxPrimitives.h', 'libSDL_gfx.so', ['SDL_gfx']),
     ]
-
     if not DEPS[0].found:
-        print 'Unable to run "sdl-config". Please make sure a development version of SDL is installed.'
+        print ('Unable to run "sdl-config". Please make sure a development version of SDL is installed.')
         raise SystemExit
 
     if localbase:
     incdirs += ["/usr/local"+d for d in origincdirs]
     libdirs += ["/usr/local"+d for d in origlibdirs]
 
-    for arg in string.split(DEPS[0].cflags):
+    for arg in DEPS[0].cflags.split():
         if arg[:2] == '-I':
             incdirs.append(arg[2:])
         elif arg[:2] == '-L':
     return DEPS
 
 if __name__ == '__main__':
-    print """This is the configuration subscript for Unix.
-Please run "config.py" for full configuration."""
+    print ("""This is the configuration subscript for Unix.
+Please run "config.py" for full configuration.""")
 
 from glob import glob
 from distutils.sysconfig import get_python_inc
 
+try:
+    raw_input
+except NameError:
+    raw_input = input
+
 huntpaths = ['..', '..\\..', '..\\*', '..\\..\\*']
 
 
         self.inc_dir = None
         self.lib_dir = None
         self.libs = libs
-        self.found = 0
+        self.found = False
         self.cflags = ''
                  
     def hunt(self):
 
     def choosepath(self):
         if not self.paths:
-            print 'Path for ', self.name, 'not found.'
-            if self.required: print 'Too bad that is a requirement! Hand-fix the "Setup"'
+            print ("Path for %s not found." % self.name)
+            if self.required:
+                print ('Too bad that is a requirement! Hand-fix the "Setup"')
         elif len(self.paths) == 1:
             self.path = self.paths[0]
-            print 'Path for '+self.name+':', self.path
+            print ("Path for %s:' % self.name")
         else:
-            print 'Select path for '+self.name+':'
+            print ("Select path for %s:" % self.name)
             for i in range(len(self.paths)):
-                print '  ', i+1, '=', self.paths[i]
-            print '  ', 0, '= <Nothing>'
-            choice = raw_input('Select 0-'+`len(self.paths)`+' (1=default):')
+                print ("  %i=%s" % (i + 1, self.paths[i]))
+            print ("  %i = <Nothing>" % 0)
+            choice = raw_input("Select 0-%i (1=default):" % len(self.paths))
             if not choice: choice = 1
             else: choice = int(choice)
             if(choice):
         self.hunt()
         self.choosepath()
         if self.path:
-            self.found = 1
+            self.found = True
             self.inc_dir = self.findhunt(self.path, Dependency.inc_hunt)
             self.lib_dir = self.findhunt(self.path, Dependency.lib_hunt)
 
         self.inc_dir = ''
         self.libs = []
         self.cflags = ''
-        self.found = 0
+        self.found = False
         self.ver = '0'
         self.module = module
         self.header = header
  
     def configure(self):
-        self.found = 1
+        self.found = True
         if self.module:
             try:
                 self.ver = __import__(self.module).__version__
             except ImportError:
-                self.found = 0
+                self.found = False
         if self.found and self.header:
             fullpath = os.path.join(get_python_inc(0), self.header)
             if not os.path.isfile(fullpath):
             else:
                 self.inc_dir = os.path.split(fullpath)[0]
         if self.found:
-            print self.name + '        '[len(self.name):] + ': found', self.ver
+            print ("%-8.8s: found %s" % (self.name, self.ver))
         else:
-            print self.name + '        '[len(self.name):] + ': not found'
+            print ("%-8.8s: not found" % self.name)
 
 
 class DependencyDLL(Dependency):
         self.lib_name = lib
         self.test = re.compile(dll_regex, re.I).match
         self.lib_dir = '_'
-        self.found = 1
+        self.found = True
         self.link = link
 
     def configure(self):
                     if self.test(e) and os.path.isfile(os.path.join(path, e)):
                         # Found
                         self.lib_dir = os.path.join(path, e).replace('\\', '/')
-                        print "DLL for %s is %s" % (self.lib_name, self.lib_dir)
+                        print ("DLL for %s is %s" % (self.lib_name, self.lib_dir))
                         return
-        print "DLL for %s not found" % self.lib_name
+        print ("DLL for %s not found" % self.lib_name)
 
 class DependencyWin(object):
     def __init__(self, name, cflags):
         self.inc_dir = None
         self.lib_dir = None
         self.libs = []
-        self.found = 1
+        self.found = True
         self.cflags = cflags
         
     def configure(self):
     return list(DEPS)
 
 if __name__ == '__main__':
-    print """This is the configuration subscript for Windows.
-Please run "config.py" for full configuration."""
+    print ("""This is the configuration subscript for Windows.
+Please run "config.py" for full configuration.""")
 

docs/ref/camera.html

-
-<html>
-<title>camera - Pygame Documentation</title>
-<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>
-
-
-<table cellpadding=0 cellspacing=0 border=0 style='border: 3px solid black;' width='100%'>
-<tr>
-<td bgcolor='#c2fc20' style='padding: 6px;' align=center valign=center><a href='http://www.pygame.org/'><img src='../pygame_tiny.gif' border=0 width=200 height=60></a><br><b>pygame documentation</b></td>
-<td bgcolor='#6aee28' style='border-left: 3px solid black; padding: 6px;' align=center valign=center>
-	||&nbsp;
-	<a href=http://www.pygame.org>Pygame Home</a> &nbsp;||&nbsp;
-	<a href=../index.html>Help Contents</a> &nbsp;||
-	<a href=index.html>Reference Index</a> &nbsp;||
-	<br>&nbsp;<br>
-	
-<a href="camera.html">Camera</a>&nbsp;||&nbsp;
-<a href="cdrom.html">Cdrom</a>&nbsp;||&nbsp;
-<a href="color.html">Color</a>&nbsp;||&nbsp;
-<a href="cursors.html">Cursors</a>&nbsp;||&nbsp;
-<a href="display.html">Display</a>&nbsp;||&nbsp;
-<a href="draw.html">Draw</a>&nbsp;||&nbsp;
-<a href="event.html">Event</a>&nbsp;||&nbsp;
-<a href="examples.html">Examples</a>&nbsp;||&nbsp;
-<a href="font.html">Font</a>&nbsp;||&nbsp;
-<a href="image.html">Image</a>&nbsp;||&nbsp;
-<a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
-<a href="key.html">Key</a>&nbsp;||&nbsp;
-<a href="locals.html">Locals</a>&nbsp;||&nbsp;
-<a href="mask.html">Mask</a>&nbsp;||&nbsp;
-<a href="midi.html">Midi</a>&nbsp;||&nbsp;
-<a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
-<a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
-<a href="movie.html">Movie</a>&nbsp;||&nbsp;
-<a href="music.html">Music</a>&nbsp;||&nbsp;
-<a href="overlay.html">Overlay</a>&nbsp;||&nbsp;
-<a href="pixelarray.html">Pixelarray</a>&nbsp;||&nbsp;
-<a href="pygame.html">Pygame</a>&nbsp;||&nbsp;
-<a href="rect.html">Rect</a>&nbsp;||&nbsp;
-<a href="scrap.html">Scrap</a>&nbsp;||&nbsp;
-<a href="sndarray.html">Sndarray</a>&nbsp;||&nbsp;
-<a href="sprite.html">Sprite</a>&nbsp;||&nbsp;
-<a href="surface.html">Surface</a>&nbsp;||&nbsp;
-<a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;
-<a href="tests.html">Tests</a>&nbsp;||&nbsp;
-<a href="time.html">Time</a>&nbsp;||&nbsp;
-<a href="transform.html">Transform</a>
-</td></tr></table>
-<br>
-
-
-<a name="pygame.camera">
-<big><b>pygame.camera</big></b><br><ul>
-  <i>pygame module for camera use</i><br>
-<ul><small><table>
-  <tr><td><a href="camera.html#pygame.camera.colorspace">pygame.camera.colorspace</a> - <font size=-1>Surface colorspace conversion</font></td><td>Surface colorspace conversion</td></tr>
-  <tr><td><a href="camera.html#pygame.camera.list_cameras">pygame.camera.list_cameras</a> - <font size=-1>returns a list of available cameras</font></td><td>returns a list of available cameras</td></tr>
-  <tr><td><a href="camera.html#pygame.camera.Camera">pygame.camera.Camera</a> - <font size=-1>load a camera</font></td><td>load a camera</td></tr>
-</table></small></ul>
-<p>Pygame currently supports only Linux and v4l2 cameras. </p>
-<p>The Bayer to <tt>RGB</tt> function is based on: </p>
-<pre> Sonix SN9C101 based webcam basic I/F routines
- Copyright (C) 2004 Takafumi Mizuno <taka-qce@ls-a.jp>
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-</pre>
-<!--COMMENTS:pygame.camera--> &nbsp;<br> 
-
-
-<a name="pygame.camera.colorspace">
-<big><b>pygame.camera.colorspace</big></b><br><ul>
-  <i>Surface colorspace conversion</i><br>
-  <tt>pygame.camera.colorspace(Surface, format, DestSurface = None): return Surface</tt><br>
-<p>Allows for conversion from <tt>"RGB"</tt> to a destination colorspace of <tt>"HSV"</tt> or <tt>"YUV"</tt>. The source and destination surfaces must be the same size and pixel depth. This is useful for computer vision on devices with limited processing power. Capture as small of an image as possible, <tt>transform.scale()</tt> it even smaller, and then convert the colorspace to <tt>YUV</tt> or <tt>HSV</tt> before doing any processing on it. </p>
-<!--COMMENTS:pygame.camera.colorspace--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.camera.list_cameras">
-<big><b>pygame.camera.list_cameras</big></b><br><ul>
-  <i>returns a list of available cameras</i><br>
-  <tt>pygame.camera.list_cameras(): return [cameras]</tt><br>
-<p>Checks the computer for available cameras and returns a list of strings of camera names, ready to be fed into <tt>pygame.camera.Camera</tt>. </p>
-<!--COMMENTS:pygame.camera.list_cameras--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.camera.Camera">
-<big><b>pygame.camera.Camera</big></b><br><ul>
-  <i>load a camera</i><br>
-  <tt>pygame.camera.Camera(device, (width, height), format): return Camera</tt><br>
-<ul><small><table>
-  <tr><td><a href="camera.html#Camera.start">Camera.start</a> - <font size=-1>opens, initializes, and starts capturing</font></td><td>opens, initializes, and starts capturing</td></tr>
-  <tr><td><a href="camera.html#Camera.stop">Camera.stop</a> - <font size=-1>stops, uninitializes, and closes the camera</font></td><td>stops, uninitializes, and closes the camera</td></tr>
-  <tr><td><a href="camera.html#Camera.get_controls">Camera.get_controls</a> - <font size=-1>gets current values of user controls</font></td><td>gets current values of user controls</td></tr>
-  <tr><td><a href="camera.html#Camera.set_controls">Camera.set_controls</a> - <font size=-1>changes camera settings if supported by the camera</font></td><td>changes camera settings if supported by the camera</td></tr>
-  <tr><td><a href="camera.html#Camera.get_size">Camera.get_size</a> - <font size=-1>returns the dimensions of the images being recorded</font></td><td>returns the dimensions of the images being recorded</td></tr>
-  <tr><td><a href="camera.html#Camera.query_image">Camera.query_image</a> - <font size=-1>checks if a frame is ready</font></td><td>checks if a frame is ready</td></tr>
-  <tr><td><a href="camera.html#Camera.get_image">Camera.get_image</a> - <font size=-1>captures an image as a Surface</font></td><td>captures an image as a Surface</td></tr>
-  <tr><td><a href="camera.html#Camera.get_raw">Camera.get_raw</a> - <font size=-1>returns an unmodified image as a string</font></td><td>returns an unmodified image as a string</td></tr>
-</table></small></ul>
-<p>Loads a v4l2 camera. The device is typically something like "/dev/video0". Default width and height are 640 by 480. Format is the desired colorspace of the output. This is useful for computer vision purposes. The following are supported: </p>
-<ul>
- <li> RGB - Red, Green, Blue </li>
- <li> YUV - Luma, Blue Chrominance, Red Chrominance </li>
- <li> HSV - Hue, Saturation, Value </li>
-</ul>
-<!--COMMENTS:pygame.camera.Camera--> &nbsp;<br> 
-
-
-<a name="Camera.start">
-<big><b>Camera.start</big></b><br><ul>
-  <i>opens, initializes, and starts capturing</i><br>
-  <tt>Camera.start(): return None</tt><br>
-<p>Opens the camera device, attempts to initialize it, and begins recording images to a buffer. </p>
-<!--COMMENTS:Camera.start--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.stop">
-<big><b>Camera.stop</big></b><br><ul>
-  <i>stops, uninitializes, and closes the camera</i><br>
-  <tt>Camera.stop(): return None</tt><br>
-<p>Stops recording, uninitializes the camera, and closes it. </p>
-<!--COMMENTS:Camera.stop--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.get_controls">
-<big><b>Camera.get_controls</big></b><br><ul>
-  <i>gets current values of user controls</i><br>
-  <tt>Camera.get_controls(): return (hflip = bool, vflip = bool)</tt><br>
-<p>If the camera supports it, get_controls will return the current settings for horizontal and vertical image flip as bools. If unsupported, it will return the default values of (0, 0). Note that the return values here may be different than those returned by set_controls, though these are more likely to be correct. </p>
-<!--COMMENTS:Camera.get_controls--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.set_controls">
-<big><b>Camera.set_controls</big></b><br><ul>
-  <i>changes camera settings if supported by the camera</i><br>
-  <tt>Camera.set_controls(hflip = bool, vflip = bool): return (hflip = bool, vflip = bool)</tt><br>
-<p>Allows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in use if not. Each argument is optional, and the desired one can be chosen by supplying the keyword, like hflip. Note that the actual settings being used by the camera may not be the same as those returned by set_controls. </p>
-<!--COMMENTS:Camera.set_controls--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.get_size">
-<big><b>Camera.get_size</big></b><br><ul>
-  <i>returns the dimensions of the images being recorded</i><br>
-  <tt>Camera.get_size(): return (width, height)</tt><br>
-<p>Returns the current dimensions of the images being captured by the camera. </p>
-<!--COMMENTS:Camera.get_size--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.query_image">
-<big><b>Camera.query_image</big></b><br><ul>
-  <i>checks if a frame is ready</i><br>
-  <tt>Camera.query_image(): return bool</tt><br>
-<p>If an image is ready to get, it returns true. Otherwise it returns false. Note that some webcams will always return False and will only queue a frame when called with a blocking function like get_image(). </p>
-<!--COMMENTS:Camera.query_image--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.get_image">
-<big><b>Camera.get_image</big></b><br><ul>
-  <i>captures an image as a Surface</i><br>
-  <tt>Camera.get_image(Surface = None): return Surface</tt><br>
-<p>Pulls an image off of the buffer as an <tt>RGB</tt> Surface. It can optionally reuse an existing Surface to save time. The bit depth of the surface is either 24bits or the same as the optionally supplied Surface. </p>
-<!--COMMENTS:Camera.get_image--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Camera.get_raw">
-<big><b>Camera.get_raw</big></b><br><ul>
-  <i>returns an unmodified image as a string</i><br>
-  <tt>Camera.get_raw(): return string</tt><br>
-<p>Gets an image from a camera as a string in the native pixelformat of the camera. Useful for integration with other libraries. </p>
-<!--COMMENTS:Camera.get_raw--> &nbsp;<br> 
-<br></ul>
-<br></ul>
-<br></ul>
-
-</body></html>
+
+<html>
+<title>camera - Pygame Documentation</title>
+<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>
+
+
+<table cellpadding=0 cellspacing=0 border=0 style='border: 3px solid black;' width='100%'>
+<tr>
+<td bgcolor='#c2fc20' style='padding: 6px;' align=center valign=center><a href='http://www.pygame.org/'><img src='../pygame_tiny.gif' border=0 width=200 height=60></a><br><b>pygame documentation</b></td>
+<td bgcolor='#6aee28' style='border-left: 3px solid black; padding: 6px;' align=center valign=center>
+	||&nbsp;
+	<a href=http://www.pygame.org>Pygame Home</a> &nbsp;||&nbsp;
+	<a href=../index.html>Help Contents</a> &nbsp;||
+	<a href=index.html>Reference Index</a> &nbsp;||
+	<br>&nbsp;<br>
+	
+<a href="camera.html">Camera</a>&nbsp;||&nbsp;
+<a href="cdrom.html">Cdrom</a>&nbsp;||&nbsp;
+<a href="color.html">Color</a>&nbsp;||&nbsp;
+<a href="cursors.html">Cursors</a>&nbsp;||&nbsp;
+<a href="display.html">Display</a>&nbsp;||&nbsp;
+<a href="draw.html">Draw</a>&nbsp;||&nbsp;
+<a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
+<a href="font.html">Font</a>&nbsp;||&nbsp;
+<a href="image.html">Image</a>&nbsp;||&nbsp;
+<a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
+<a href="key.html">Key</a>&nbsp;||&nbsp;
+<a href="locals.html">Locals</a>&nbsp;||&nbsp;
+<a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
+<a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
+<a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
+<a href="movie.html">Movie</a>&nbsp;||&nbsp;
+<a href="music.html">Music</a>&nbsp;||&nbsp;
+<a href="overlay.html">Overlay</a>&nbsp;||&nbsp;
+<a href="pixelarray.html">Pixelarray</a>&nbsp;||&nbsp;
+<a href="pygame.html">Pygame</a>&nbsp;||&nbsp;
+<a href="rect.html">Rect</a>&nbsp;||&nbsp;
+<a href="scrap.html">Scrap</a>&nbsp;||&nbsp;
+<a href="sndarray.html">Sndarray</a>&nbsp;||&nbsp;
+<a href="sprite.html">Sprite</a>&nbsp;||&nbsp;
+<a href="surface.html">Surface</a>&nbsp;||&nbsp;
+<a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;
+<a href="tests.html">Tests</a>&nbsp;||&nbsp;
+<a href="time.html">Time</a>&nbsp;||&nbsp;
+<a href="transform.html">Transform</a>
+</td></tr></table>
+<br>
+
+
+<a name="pygame.camera">
+<big><b>pygame.camera</big></b><br><ul>
+  <i>pygame module for camera use</i><br>
+<ul><small><table>
+  <tr><td><a href="camera.html#pygame.camera.colorspace">pygame.camera.colorspace</a> - <font size=-1>Surface colorspace conversion</font></td><td>Surface colorspace conversion</td></tr>
+  <tr><td><a href="camera.html#pygame.camera.list_cameras">pygame.camera.list_cameras</a> - <font size=-1>returns a list of available cameras</font></td><td>returns a list of available cameras</td></tr>
+  <tr><td><a href="camera.html#pygame.camera.Camera">pygame.camera.Camera</a> - <font size=-1>load a camera</font></td><td>load a camera</td></tr>
+</table></small></ul>
+<p>Pygame currently supports only Linux and v4l2 cameras. </p>
+<p>The Bayer to <tt>RGB</tt> function is based on: </p>
+<pre> Sonix SN9C101 based webcam basic I/F routines
+ Copyright (C) 2004 Takafumi Mizuno <taka-qce@ls-a.jp>
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+</pre>
+<!--COMMENTS:pygame.camera--> &nbsp;<br> 
+
+
+<a name="pygame.camera.colorspace">
+<big><b>pygame.camera.colorspace</big></b><br><ul>
+  <i>Surface colorspace conversion</i><br>
+  <tt>pygame.camera.colorspace(Surface, format, DestSurface = None): return Surface</tt><br>
+<p>Allows for conversion from <tt>"RGB"</tt> to a destination colorspace of <tt>"HSV"</tt> or <tt>"YUV"</tt>. The source and destination surfaces must be the same size and pixel depth. This is useful for computer vision on devices with limited processing power. Capture as small of an image as possible, <tt>transform.scale()</tt> it even smaller, and then convert the colorspace to <tt>YUV</tt> or <tt>HSV</tt> before doing any processing on it. </p>
+<!--COMMENTS:pygame.camera.colorspace--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.camera.list_cameras">
+<big><b>pygame.camera.list_cameras</big></b><br><ul>
+  <i>returns a list of available cameras</i><br>
+  <tt>pygame.camera.list_cameras(): return [cameras]</tt><br>
+<p>Checks the computer for available cameras and returns a list of strings of camera names, ready to be fed into <tt>pygame.camera.Camera</tt>. </p>
+<!--COMMENTS:pygame.camera.list_cameras--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.camera.Camera">
+<big><b>pygame.camera.Camera</big></b><br><ul>
+  <i>load a camera</i><br>
+  <tt>pygame.camera.Camera(device, (width, height), format): return Camera</tt><br>
+<ul><small><table>
+  <tr><td><a href="camera.html#Camera.start">Camera.start</a> - <font size=-1>opens, initializes, and starts capturing</font></td><td>opens, initializes, and starts capturing</td></tr>
+  <tr><td><a href="camera.html#Camera.stop">Camera.stop</a> - <font size=-1>stops, uninitializes, and closes the camera</font></td><td>stops, uninitializes, and closes the camera</td></tr>
+  <tr><td><a href="camera.html#Camera.get_controls">Camera.get_controls</a> - <font size=-1>gets current values of user controls</font></td><td>gets current values of user controls</td></tr>
+  <tr><td><a href="camera.html#Camera.set_controls">Camera.set_controls</a> - <font size=-1>changes camera settings if supported by the camera</font></td><td>changes camera settings if supported by the camera</td></tr>
+  <tr><td><a href="camera.html#Camera.get_size">Camera.get_size</a> - <font size=-1>returns the dimensions of the images being recorded</font></td><td>returns the dimensions of the images being recorded</td></tr>
+  <tr><td><a href="camera.html#Camera.query_image">Camera.query_image</a> - <font size=-1>checks if a frame is ready</font></td><td>checks if a frame is ready</td></tr>
+  <tr><td><a href="camera.html#Camera.get_image">Camera.get_image</a> - <font size=-1>captures an image as a Surface</font></td><td>captures an image as a Surface</td></tr>
+  <tr><td><a href="camera.html#Camera.get_raw">Camera.get_raw</a> - <font size=-1>returns an unmodified image as a string</font></td><td>returns an unmodified image as a string</td></tr>
+</table></small></ul>
+<p>Loads a v4l2 camera. The device is typically something like "/dev/video0". Default width and height are 640 by 480. Format is the desired colorspace of the output. This is useful for computer vision purposes. The following are supported: </p>
+<ul>
+ <li> RGB - Red, Green, Blue </li>
+ <li> YUV - Luma, Blue Chrominance, Red Chrominance </li>
+ <li> HSV - Hue, Saturation, Value </li>
+</ul>
+<!--COMMENTS:pygame.camera.Camera--> &nbsp;<br> 
+
+
+<a name="Camera.start">
+<big><b>Camera.start</big></b><br><ul>
+  <i>opens, initializes, and starts capturing</i><br>
+  <tt>Camera.start(): return None</tt><br>
+<p>Opens the camera device, attempts to initialize it, and begins recording images to a buffer. </p>
+<!--COMMENTS:Camera.start--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.stop">
+<big><b>Camera.stop</big></b><br><ul>
+  <i>stops, uninitializes, and closes the camera</i><br>
+  <tt>Camera.stop(): return None</tt><br>
+<p>Stops recording, uninitializes the camera, and closes it. </p>
+<!--COMMENTS:Camera.stop--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.get_controls">
+<big><b>Camera.get_controls</big></b><br><ul>
+  <i>gets current values of user controls</i><br>
+  <tt>Camera.get_controls(): return (hflip = bool, vflip = bool)</tt><br>
+<p>If the camera supports it, get_controls will return the current settings for horizontal and vertical image flip as bools. If unsupported, it will return the default values of (0, 0). Note that the return values here may be different than those returned by set_controls, though these are more likely to be correct. </p>
+<!--COMMENTS:Camera.get_controls--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.set_controls">
+<big><b>Camera.set_controls</big></b><br><ul>
+  <i>changes camera settings if supported by the camera</i><br>
+  <tt>Camera.set_controls(hflip = bool, vflip = bool): return (hflip = bool, vflip = bool)</tt><br>
+<p>Allows you to change camera settings if the camera supports it. The return values will be the input values if the camera claims it succeeded or the values previously in use if not. Each argument is optional, and the desired one can be chosen by supplying the keyword, like hflip. Note that the actual settings being used by the camera may not be the same as those returned by set_controls. </p>
+<!--COMMENTS:Camera.set_controls--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.get_size">
+<big><b>Camera.get_size</big></b><br><ul>
+  <i>returns the dimensions of the images being recorded</i><br>
+  <tt>Camera.get_size(): return (width, height)</tt><br>
+<p>Returns the current dimensions of the images being captured by the camera. </p>
+<!--COMMENTS:Camera.get_size--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.query_image">
+<big><b>Camera.query_image</big></b><br><ul>
+  <i>checks if a frame is ready</i><br>
+  <tt>Camera.query_image(): return bool</tt><br>
+<p>If an image is ready to get, it returns true. Otherwise it returns false. Note that some webcams will always return False and will only queue a frame when called with a blocking function like get_image(). </p>
+<!--COMMENTS:Camera.query_image--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.get_image">
+<big><b>Camera.get_image</big></b><br><ul>
+  <i>captures an image as a Surface</i><br>
+  <tt>Camera.get_image(Surface = None): return Surface</tt><br>
+<p>Pulls an image off of the buffer as an <tt>RGB</tt> Surface. It can optionally reuse an existing Surface to save time. The bit depth of the surface is either 24bits or the same as the optionally supplied Surface. </p>
+<!--COMMENTS:Camera.get_image--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Camera.get_raw">
+<big><b>Camera.get_raw</big></b><br><ul>
+  <i>returns an unmodified image as a string</i><br>
+  <tt>Camera.get_raw(): return string</tt><br>
+<p>Gets an image from a camera as a string in the native pixelformat of the camera. Useful for integration with other libraries. </p>
+<!--COMMENTS:Camera.get_raw--> &nbsp;<br> 
+<br></ul>
+<br></ul>
+<br></ul>
+
+</body></html>

docs/ref/color.html

-
-<html>
-<title>color - Pygame Documentation</title>
-<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>
-
-
-<table cellpadding=0 cellspacing=0 border=0 style='border: 3px solid black;' width='100%'>
-<tr>
-<td bgcolor='#c2fc20' style='padding: 6px;' align=center valign=center><a href='http://www.pygame.org/'><img src='../pygame_tiny.gif' border=0 width=200 height=60></a><br><b>pygame documentation</b></td>
-<td bgcolor='#6aee28' style='border-left: 3px solid black; padding: 6px;' align=center valign=center>
-	||&nbsp;
-	<a href=http://www.pygame.org>Pygame Home</a> &nbsp;||&nbsp;
-	<a href=../index.html>Help Contents</a> &nbsp;||
-	<a href=index.html>Reference Index</a> &nbsp;||
-	<br>&nbsp;<br>
-	
-<a href="camera.html">Camera</a>&nbsp;||&nbsp;
-<a href="cdrom.html">Cdrom</a>&nbsp;||&nbsp;
-<a href="color.html">Color</a>&nbsp;||&nbsp;
-<a href="cursors.html">Cursors</a>&nbsp;||&nbsp;
-<a href="display.html">Display</a>&nbsp;||&nbsp;
-<a href="draw.html">Draw</a>&nbsp;||&nbsp;
-<a href="event.html">Event</a>&nbsp;||&nbsp;
-<a href="examples.html">Examples</a>&nbsp;||&nbsp;
-<a href="font.html">Font</a>&nbsp;||&nbsp;
-<a href="image.html">Image</a>&nbsp;||&nbsp;
-<a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
-<a href="key.html">Key</a>&nbsp;||&nbsp;
-<a href="locals.html">Locals</a>&nbsp;||&nbsp;
-<a href="mask.html">Mask</a>&nbsp;||&nbsp;
-<a href="midi.html">Midi</a>&nbsp;||&nbsp;
-<a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
-<a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
-<a href="movie.html">Movie</a>&nbsp;||&nbsp;
-<a href="music.html">Music</a>&nbsp;||&nbsp;
-<a href="overlay.html">Overlay</a>&nbsp;||&nbsp;
-<a href="pixelarray.html">Pixelarray</a>&nbsp;||&nbsp;
-<a href="pygame.html">Pygame</a>&nbsp;||&nbsp;
-<a href="rect.html">Rect</a>&nbsp;||&nbsp;
-<a href="scrap.html">Scrap</a>&nbsp;||&nbsp;
-<a href="sndarray.html">Sndarray</a>&nbsp;||&nbsp;
-<a href="sprite.html">Sprite</a>&nbsp;||&nbsp;
-<a href="surface.html">Surface</a>&nbsp;||&nbsp;
-<a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;
-<a href="tests.html">Tests</a>&nbsp;||&nbsp;
-<a href="time.html">Time</a>&nbsp;||&nbsp;
-<a href="transform.html">Transform</a>
-</td></tr></table>
-<br>
-
-
-<a name="pygame.Color">
-<big><b>pygame.Color</big></b><br><ul>
-  <i>pygame object for color representations</i><br>
-  <tt>pygame.Color(name): Return Color</tt><br>
-  <tt>pygame.Color(r, g, b, a): Return Color</tt><br>
-  <tt>pygame.Color(rgbvalue): Return Color</tt><br>
-<ul><small><table>
-  <tr><td><a href="color.html#Color.r">Color.r</a> - <font size=-1>Gets or sets the red value of the Color.</font></td><td>Gets or sets the red value of the Color.</td></tr>
-  <tr><td><a href="color.html#Color.g">Color.g</a> - <font size=-1>Gets or sets the green value of the Color.</font></td><td>Gets or sets the green value of the Color.</td></tr>
-  <tr><td><a href="color.html#Color.b">Color.b</a> - <font size=-1>Gets or sets the blue value of the Color.</font></td><td>Gets or sets the blue value of the Color.</td></tr>
-  <tr><td><a href="color.html#Color.a">Color.a</a> - <font size=-1>Gets or sets the alpha value of the Color.</font></td><td>Gets or sets the alpha value of the Color.</td></tr>
-  <tr><td><a href="color.html#Color.cmy">Color.cmy</a> - <font size=-1>Gets or sets the CMY representation of the Color.</font></td><td>Gets or sets the CMY representation of the Color.</td></tr>
-  <tr><td><a href="color.html#Color.hsva">Color.hsva</a> - <font size=-1>Gets or sets the HSVA representation of the Color.</font></td><td>Gets or sets the HSVA representation of the Color.</td></tr>
-  <tr><td><a href="color.html#Color.hsla">Color.hsla</a> - <font size=-1>Gets or sets the HSLA representation of the Color.</font></td><td>Gets or sets the HSLA representation of the Color.</td></tr>
-  <tr><td><a href="color.html#Color.i1i2i3">Color.i1i2i3</a> - <font size=-1>Gets or sets the I1I2I3 representation of the Color.</font></td><td>Gets or sets the I1I2I3 representation of the Color.</td></tr>
-  <tr><td><a href="color.html#Color.normalize">Color.normalize</a> - <font size=-1>Returns the normalized RGBA values of the Color.</font></td><td>Returns the normalized RGBA values of the Color.</td></tr>
-  <tr><td><a href="color.html#Color.correct_gamma">Color.correct_gamma</a> - <font size=-1>Applies a certain gamma value to the Color.</font></td><td>Applies a certain gamma value to the Color.</td></tr>
-</table></small></ul>
-<p>The Color class represents <tt>RGBA</tt> color values using a value range of 0-255. It allows basic arithmetic operations to create new colors, supports conversions to other color spaces such as <tt>HSV</tt> or <tt>HSL</tt> and lets you adjust single color channels. Alpha defaults to 255 when not given. </p>
-<p>'rgbvalue' can be either a color name, an <tt>HTML</tt> color format string, a hex number string, or an integer pixel value. The <tt>HTML</tt> format is '#rrggbbaa', where rr, gg, bb, and aa are 2 digit hex numbers. The alpha aa is optional. <tt>A</tt> hex number string has the form '0xrrggbbaa', where aa is optional. </p>
-<p>Color objects support equality comparison with other color objects and 3 or 4 element tuples of integers (New in <tt>1.9.0)</tt>. </p>
-<p>New in pygame <tt>1.8.1</tt>. </p>
-<!--COMMENTS:pygame.Color--> &nbsp;<br> 
-
-
-<a name="Color.r">
-<big><b>Color.r</big></b><br><ul>
-  <i>Gets or sets the red value of the Color.</i><br>
-  <tt>Color.r: Return int</tt><br>
-<p>The red value of the Color. </p>
-<!--COMMENTS:Color.r--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Color.g">
-<big><b>Color.g</big></b><br><ul>
-  <i>Gets or sets the green value of the Color.</i><br>
-  <tt>Color.g: Return int</tt><br>
-<p>The green value of the Color. </p>
-<!--COMMENTS:Color.g--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Color.b">
-<big><b>Color.b</big></b><br><ul>
-  <i>Gets or sets the blue value of the Color.</i><br>
-  <tt>Color.b: Return int</tt><br>
-<p>The blue value of the Color. </p>
-<!--COMMENTS:Color.b--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Color.a">
-<big><b>Color.a</big></b><br><ul>
-  <i>Gets or sets the alpha value of the Color.</i><br>
-  <tt>Color.a: Return int</tt><br>
-<p>The alpha value of the Color. </p>
-<!--COMMENTS:Color.a--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Color.cmy">
-<big><b>Color.cmy</big></b><br><ul>
-  <i>Gets or sets the CMY representation of the Color.</i><br>
-  <tt>Color.cmy: Return tuple</tt><br>
-<p>The <tt>CMY</tt> representation of the Color. The <tt>CMY</tt> components are in the ranges <tt>C</tt> = [0, 1], <tt>M</tt> = [0, 1], <tt>Y</tt> = [0, 1]. Note that this will not return the absolutely exact <tt>CMY</tt> values for the set <tt>RGB</tt> values in all cases. Due to the <tt>RGB</tt> mapping from 0-255 and the <tt>CMY</tt> mapping from 0-1 rounding errors may cause the <tt>CMY</tt> values to differ slightly from what you might expect. </p>
-<!--COMMENTS:Color.cmy--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Color.hsva">
-<big><b>Color.hsva</big></b><br><ul>
-  <i>Gets or sets the HSVA representation of the Color.</i><br>
-  <tt>Color.hsva: Return tuple</tt><br>
-<p>The <tt>HSVA</tt> representation of the Color. The <tt>HSVA</tt> components are in the ranges <tt>H</tt> = [0, 360], <tt>S</tt> = [0, 100], <tt>V</tt> = [0, 100], <tt>A</tt> = [0, 100]. Note that this will not return the absolutely exact <tt>HSV</tt> values for the set <tt>RGB</tt> values in all cases. Due to the <tt>RGB</tt> mapping from 0-255 and the <tt>HSV</tt> mapping from 0-100 and 0-360 rounding errors may cause the <tt>HSV</tt> values to differ slightly from what you might expect. </p>
-<!--COMMENTS:Color.hsva--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Color.hsla">
-<big><b>Color.hsla</big></b><br><ul>
-  <i>Gets or sets the HSLA representation of the Color.</i><br>
-  <tt>Color.hsla: Return tuple</tt><br>
-<p>The <tt>HSLA</tt> representation of the Color. The <tt>HSLA</tt> components are in the ranges <tt>H</tt> = [0, 360], <tt>S</tt> = [0, 100], <tt>V</tt> = [0, 100], <tt>A</tt> = [0, 100]. Note that this will not return the absolutely exact <tt>HSL</tt> values for the set <tt>RGB</tt> values in all cases. Due to the <tt>RGB</tt> mapping from 0-255 and the <tt>HSL</tt> mapping from 0-100 and 0-360 rounding errors may cause the <tt>HSL</tt> values to differ slightly from what you might expect. </p>
-<!--COMMENTS:Color.hsla--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Color.i1i2i3">
-<big><b>Color.i1i2i3</big></b><br><ul>
-  <i>Gets or sets the I1I2I3 representation of the Color.</i><br>
-  <tt>Color.i1i2i3: Return tuple</tt><br>
-<p>The <tt>I1I2I3</tt> representation of the Color. The <tt>I1I2I3</tt> components are in the ranges <tt>I1</tt> = [0, 1], <tt>I2</tt> = <tt>[-0.5</tt>, <tt>0.5]</tt>, <tt>I3</tt> = <tt>[-0.5</tt>, <tt>0.5]</tt>. Note that this will not return the absolutely exact <tt>I1I2I3</tt> values for the set <tt>RGB</tt> values in all cases. Due to the <tt>RGB</tt> mapping from 0-255 and the <tt>I1I2I3</tt> mapping from 0-1 rounding errors may cause the <tt>I1I2I3</tt> values to differ slightly from what you might expect. </p>
-<!--COMMENTS:Color.i1i2i3--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Color.normalize">
-<big><b>Color.normalize</big></b><br><ul>
-  <i>Returns the normalized RGBA values of the Color.</i><br>
-  <tt>Color.normalize(): Return tuple</tt><br>
-<p>Returns the normalized <tt>RGBA</tt> values of the Color as floating point values. </p>
-<!--COMMENTS:Color.normalize--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Color.correct_gamma">
-<big><b>Color.correct_gamma</big></b><br><ul>
-  <i>Applies a certain gamma value to the Color.</i><br>
-  <tt>Color.correct_gamma (gamma): Return Color</tt><br>
-<p>Applies a certain gamma value to the Color and returns a new Color with the adjusted <tt>RGBA</tt> values. </p>
-<!--COMMENTS:Color.correct_gamma--> &nbsp;<br> 
-<br></ul>
-<br></ul>
-
-</body></html>
+
+<html>
+<title>color - Pygame Documentation</title>
+<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>
+
+
+<table cellpadding=0 cellspacing=0 border=0 style='border: 3px solid black;' width='100%'>
+<tr>
+<td bgcolor='#c2fc20' style='padding: 6px;' align=center valign=center><a href='http://www.pygame.org/'><img src='../pygame_tiny.gif' border=0 width=200 height=60></a><br><b>pygame documentation</b></td>
+<td bgcolor='#6aee28' style='border-left: 3px solid black; padding: 6px;' align=center valign=center>
+	||&nbsp;
+	<a href=http://www.pygame.org>Pygame Home</a> &nbsp;||&nbsp;
+	<a href=../index.html>Help Contents</a> &nbsp;||
+	<a href=index.html>Reference Index</a> &nbsp;||
+	<br>&nbsp;<br>
+	
+<a href="camera.html">Camera</a>&nbsp;||&nbsp;
+<a href="cdrom.html">Cdrom</a>&nbsp;||&nbsp;
+<a href="color.html">Color</a>&nbsp;||&nbsp;
+<a href="cursors.html">Cursors</a>&nbsp;||&nbsp;
+<a href="display.html">Display</a>&nbsp;||&nbsp;
+<a href="draw.html">Draw</a>&nbsp;||&nbsp;
+<a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
+<a href="font.html">Font</a>&nbsp;||&nbsp;
+<a href="image.html">Image</a>&nbsp;||&nbsp;
+<a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
+<a href="key.html">Key</a>&nbsp;||&nbsp;
+<a href="locals.html">Locals</a>&nbsp;||&nbsp;
+<a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
+<a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
+<a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
+<a href="movie.html">Movie</a>&nbsp;||&nbsp;
+<a href="music.html">Music</a>&nbsp;||&nbsp;
+<a href="overlay.html">Overlay</a>&nbsp;||&nbsp;
+<a href="pixelarray.html">Pixelarray</a>&nbsp;||&nbsp;
+<a href="pygame.html">Pygame</a>&nbsp;||&nbsp;
+<a href="rect.html">Rect</a>&nbsp;||&nbsp;
+<a href="scrap.html">Scrap</a>&nbsp;||&nbsp;
+<a href="sndarray.html">Sndarray</a>&nbsp;||&nbsp;
+<a href="sprite.html">Sprite</a>&nbsp;||&nbsp;
+<a href="surface.html">Surface</a>&nbsp;||&nbsp;
+<a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;
+<a href="tests.html">Tests</a>&nbsp;||&nbsp;
+<a href="time.html">Time</a>&nbsp;||&nbsp;
+<a href="transform.html">Transform</a>
+</td></tr></table>
+<br>
+
+
+<a name="pygame.Color">
+<big><b>pygame.Color</big></b><br><ul>
+  <i>pygame object for color representations</i><br>
+  <tt>pygame.Color(name): Return Color</tt><br>
+  <tt>pygame.Color(r, g, b, a): Return Color</tt><br>
+  <tt>pygame.Color(rgbvalue): Return Color</tt><br>
+<ul><small><table>
+  <tr><td><a href="color.html#Color.r">Color.r</a> - <font size=-1>Gets or sets the red value of the Color.</font></td><td>Gets or sets the red value of the Color.</td></tr>
+  <tr><td><a href="color.html#Color.g">Color.g</a> - <font size=-1>Gets or sets the green value of the Color.</font></td><td>Gets or sets the green value of the Color.</td></tr>
+  <tr><td><a href="color.html#Color.b">Color.b</a> - <font size=-1>Gets or sets the blue value of the Color.</font></td><td>Gets or sets the blue value of the Color.</td></tr>
+  <tr><td><a href="color.html#Color.a">Color.a</a> - <font size=-1>Gets or sets the alpha value of the Color.</font></td><td>Gets or sets the alpha value of the Color.</td></tr>
+  <tr><td><a href="color.html#Color.cmy">Color.cmy</a> - <font size=-1>Gets or sets the CMY representation of the Color.</font></td><td>Gets or sets the CMY representation of the Color.</td></tr>
+  <tr><td><a href="color.html#Color.hsva">Color.hsva</a> - <font size=-1>Gets or sets the HSVA representation of the Color.</font></td><td>Gets or sets the HSVA representation of the Color.</td></tr>
+  <tr><td><a href="color.html#Color.hsla">Color.hsla</a> - <font size=-1>Gets or sets the HSLA representation of the Color.</font></td><td>Gets or sets the HSLA representation of the Color.</td></tr>
+  <tr><td><a href="color.html#Color.i1i2i3">Color.i1i2i3</a> - <font size=-1>Gets or sets the I1I2I3 representation of the Color.</font></td><td>Gets or sets the I1I2I3 representation of the Color.</td></tr>
+  <tr><td><a href="color.html#Color.normalize">Color.normalize</a> - <font size=-1>Returns the normalized RGBA values of the Color.</font></td><td>Returns the normalized RGBA values of the Color.</td></tr>
+  <tr><td><a href="color.html#Color.correct_gamma">Color.correct_gamma</a> - <font size=-1>Applies a certain gamma value to the Color.</font></td><td>Applies a certain gamma value to the Color.</td></tr>
+</table></small></ul>
+<p>The Color class represents <tt>RGBA</tt> color values using a value range of 0-255. It allows basic arithmetic operations to create new colors, supports conversions to other color spaces such as <tt>HSV</tt> or <tt>HSL</tt> and lets you adjust single color channels. Alpha defaults to 255 when not given. </p>
+<p>'rgbvalue' can be either a color name, an <tt>HTML</tt> color format string, a hex number string, or an integer pixel value. The <tt>HTML</tt> format is '#rrggbbaa', where rr, gg, bb, and aa are 2 digit hex numbers. The alpha aa is optional. <tt>A</tt> hex number string has the form '0xrrggbbaa', where aa is optional. </p>
+<p>Color objects support equality comparison with other color objects and 3 or 4 element tuples of integers (New in <tt>1.9.0)</tt>. </p>
+<p>New in pygame <tt>1.8.1</tt>. </p>
+<!--COMMENTS:pygame.Color--> &nbsp;<br> 
+
+
+<a name="Color.r">
+<big><b>Color.r</big></b><br><ul>
+  <i>Gets or sets the red value of the Color.</i><br>
+  <tt>Color.r: Return int</tt><br>
+<p>The red value of the Color. </p>
+<!--COMMENTS:Color.r--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Color.g">
+<big><b>Color.g</big></b><br><ul>
+  <i>Gets or sets the green value of the Color.</i><br>
+  <tt>Color.g: Return int</tt><br>
+<p>The green value of the Color. </p>
+<!--COMMENTS:Color.g--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Color.b">
+<big><b>Color.b</big></b><br><ul>
+  <i>Gets or sets the blue value of the Color.</i><br>
+  <tt>Color.b: Return int</tt><br>
+<p>The blue value of the Color. </p>
+<!--COMMENTS:Color.b--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Color.a">
+<big><b>Color.a</big></b><br><ul>
+  <i>Gets or sets the alpha value of the Color.</i><br>
+  <tt>Color.a: Return int</tt><br>
+<p>The alpha value of the Color. </p>
+<!--COMMENTS:Color.a--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Color.cmy">
+<big><b>Color.cmy</big></b><br><ul>
+  <i>Gets or sets the CMY representation of the Color.</i><br>
+  <tt>Color.cmy: Return tuple</tt><br>
+<p>The <tt>CMY</tt> representation of the Color. The <tt>CMY</tt> components are in the ranges <tt>C</tt> = [0, 1], <tt>M</tt> = [0, 1], <tt>Y</tt> = [0, 1]. Note that this will not return the absolutely exact <tt>CMY</tt> values for the set <tt>RGB</tt> values in all cases. Due to the <tt>RGB</tt> mapping from 0-255 and the <tt>CMY</tt> mapping from 0-1 rounding errors may cause the <tt>CMY</tt> values to differ slightly from what you might expect. </p>
+<!--COMMENTS:Color.cmy--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Color.hsva">
+<big><b>Color.hsva</big></b><br><ul>
+  <i>Gets or sets the HSVA representation of the Color.</i><br>
+  <tt>Color.hsva: Return tuple</tt><br>
+<p>The <tt>HSVA</tt> representation of the Color. The <tt>HSVA</tt> components are in the ranges <tt>H</tt> = [0, 360], <tt>S</tt> = [0, 100], <tt>V</tt> = [0, 100], <tt>A</tt> = [0, 100]. Note that this will not return the absolutely exact <tt>HSV</tt> values for the set <tt>RGB</tt> values in all cases. Due to the <tt>RGB</tt> mapping from 0-255 and the <tt>HSV</tt> mapping from 0-100 and 0-360 rounding errors may cause the <tt>HSV</tt> values to differ slightly from what you might expect. </p>
+<!--COMMENTS:Color.hsva--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Color.hsla">
+<big><b>Color.hsla</big></b><br><ul>
+  <i>Gets or sets the HSLA representation of the Color.</i><br>
+  <tt>Color.hsla: Return tuple</tt><br>
+<p>The <tt>HSLA</tt> representation of the Color. The <tt>HSLA</tt> components are in the ranges <tt>H</tt> = [0, 360], <tt>S</tt> = [0, 100], <tt>V</tt> = [0, 100], <tt>A</tt> = [0, 100]. Note that this will not return the absolutely exact <tt>HSL</tt> values for the set <tt>RGB</tt> values in all cases. Due to the <tt>RGB</tt> mapping from 0-255 and the <tt>HSL</tt> mapping from 0-100 and 0-360 rounding errors may cause the <tt>HSL</tt> values to differ slightly from what you might expect. </p>
+<!--COMMENTS:Color.hsla--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Color.i1i2i3">
+<big><b>Color.i1i2i3</big></b><br><ul>
+  <i>Gets or sets the I1I2I3 representation of the Color.</i><br>
+  <tt>Color.i1i2i3: Return tuple</tt><br>
+<p>The <tt>I1I2I3</tt> representation of the Color. The <tt>I1I2I3</tt> components are in the ranges <tt>I1</tt> = [0, 1], <tt>I2</tt> = <tt>[-0.5</tt>, <tt>0.5]</tt>, <tt>I3</tt> = <tt>[-0.5</tt>, <tt>0.5]</tt>. Note that this will not return the absolutely exact <tt>I1I2I3</tt> values for the set <tt>RGB</tt> values in all cases. Due to the <tt>RGB</tt> mapping from 0-255 and the <tt>I1I2I3</tt> mapping from 0-1 rounding errors may cause the <tt>I1I2I3</tt> values to differ slightly from what you might expect. </p>
+<!--COMMENTS:Color.i1i2i3--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Color.normalize">
+<big><b>Color.normalize</big></b><br><ul>
+  <i>Returns the normalized RGBA values of the Color.</i><br>
+  <tt>Color.normalize(): Return tuple</tt><br>
+<p>Returns the normalized <tt>RGBA</tt> values of the Color as floating point values. </p>
+<!--COMMENTS:Color.normalize--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Color.correct_gamma">
+<big><b>Color.correct_gamma</big></b><br><ul>
+  <i>Applies a certain gamma value to the Color.</i><br>
+  <tt>Color.correct_gamma (gamma): Return Color</tt><br>
+<p>Applies a certain gamma value to the Color and returns a new Color with the adjusted <tt>RGBA</tt> values. </p>
+<!--COMMENTS:Color.correct_gamma--> &nbsp;<br> 
+<br></ul>
+<br></ul>
+
+</body></html>

docs/ref/examples.html

-
-<html>
-<title>examples - Pygame Documentation</title>
-<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>
-
-
-<table cellpadding=0 cellspacing=0 border=0 style='border: 3px solid black;' width='100%'>
-<tr>
-<td bgcolor='#c2fc20' style='padding: 6px;' align=center valign=center><a href='http://www.pygame.org/'><img src='../pygame_tiny.gif' border=0 width=200 height=60></a><br><b>pygame documentation</b></td>
-<td bgcolor='#6aee28' style='border-left: 3px solid black; padding: 6px;' align=center valign=center>
-	||&nbsp;
-	<a href=http://www.pygame.org>Pygame Home</a> &nbsp;||&nbsp;
-	<a href=../index.html>Help Contents</a> &nbsp;||
-	<a href=index.html>Reference Index</a> &nbsp;||
-	<br>&nbsp;<br>
-	
-<a href="camera.html">Camera</a>&nbsp;||&nbsp;
-<a href="cdrom.html">Cdrom</a>&nbsp;||&nbsp;
-<a href="color.html">Color</a>&nbsp;||&nbsp;
-<a href="cursors.html">Cursors</a>&nbsp;||&nbsp;
-<a href="display.html">Display</a>&nbsp;||&nbsp;
-<a href="draw.html">Draw</a>&nbsp;||&nbsp;
-<a href="event.html">Event</a>&nbsp;||&nbsp;
-<a href="examples.html">Examples</a>&nbsp;||&nbsp;
-<a href="font.html">Font</a>&nbsp;||&nbsp;
-<a href="image.html">Image</a>&nbsp;||&nbsp;
-<a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
-<a href="key.html">Key</a>&nbsp;||&nbsp;
-<a href="locals.html">Locals</a>&nbsp;||&nbsp;
-<a href="mask.html">Mask</a>&nbsp;||&nbsp;
-<a href="midi.html">Midi</a>&nbsp;||&nbsp;
-<a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
-<a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
-<a href="movie.html">Movie</a>&nbsp;||&nbsp;
-<a href="music.html">Music</a>&nbsp;||&nbsp;
-<a href="overlay.html">Overlay</a>&nbsp;||&nbsp;
-<a href="pixelarray.html">Pixelarray</a>&nbsp;||&nbsp;
-<a href="pygame.html">Pygame</a>&nbsp;||&nbsp;
-<a href="rect.html">Rect</a>&nbsp;||&nbsp;
-<a href="scrap.html">Scrap</a>&nbsp;||&nbsp;
-<a href="sndarray.html">Sndarray</a>&nbsp;||&nbsp;
-<a href="sprite.html">Sprite</a>&nbsp;||&nbsp;
-<a href="surface.html">Surface</a>&nbsp;||&nbsp;
-<a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;
-<a href="tests.html">Tests</a>&nbsp;||&nbsp;
-<a href="time.html">Time</a>&nbsp;||&nbsp;
-<a href="transform.html">Transform</a>
-</td></tr></table>
-<br>
-
-
-<a name="pygame.examples">
-<big><b>pygame.examples</big></b><br><ul>
-  <i>module of example programs</i><br>
-<ul><small><table>
-  <tr><td><a href="examples.html#pygame.examples.aliens.main">pygame.examples.aliens.main</a> - <font size=-1>play the full aliens example</font></td><td>play the full aliens example</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.oldalien.main">pygame.examples.oldalien.main</a> - <font size=-1>play the original aliens example</font></td><td>play the original aliens example</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.stars.main">pygame.examples.stars.main</a> - <font size=-1>run a simple starfield example</font></td><td>run a simple starfield example</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.chimp.main">pygame.examples.chimp.main</a> - <font size=-1>hit the moving chimp</font></td><td>hit the moving chimp</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.moveit.main">pygame.examples.moveit.main</a> - <font size=-1>display animated objects on the screen</font></td><td>display animated objects on the screen</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.fonty.main">pygame.examples.fonty.main</a> - <font size=-1>run a font rendering example</font></td><td>run a font rendering example</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.vgrade.main">pygame.examples.vgrade.main</a> - <font size=-1>display a vertical gradient</font></td><td>display a vertical gradient</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.eventlist.main">pygame.examples.eventlist.main</a> - <font size=-1>display pygame events</font></td><td>display pygame events</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.arraydemo.main">pygame.examples.arraydemo.main</a> - <font size=-1>show various surfarray effects</font></td><td>show various surfarray effects</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.sound.main">pygame.examples.sound.main</a> - <font size=-1>load and play a sound</font></td><td>load and play a sound</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.sound_array_demos.main">pygame.examples.sound_array_demos.main</a> - <font size=-1>play various sndarray effects</font></td><td>play various sndarray effects</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.liquid.main">pygame.examples.liquid.main</a> - <font size=-1>display an animated liquid effect</font></td><td>display an animated liquid effect</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.glcube.main">pygame.examples.glcube.main</a> - <font size=-1>display an animated 3D cube using OpenGL</font></td><td>display an animated 3D cube using OpenGL</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.scrap_clipboard.main">pygame.examples.scrap_clipboard.main</a> - <font size=-1>access the clipboard</font></td><td>access the clipboard</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.mask.main">pygame.examples.mask.main</a> - <font size=-1>display multiple images bounce off each other using collision detection</font></td><td>display multiple images bounce off each other using collision detection</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.testsprite.main">pygame.examples.testsprite.main</a> - <font size=-1>show lots of sprites moving around</font></td><td>show lots of sprites moving around</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.headless_no_windows_needed.main">pygame.examples.headless_no_windows_needed.main</a> - <font size=-1>write an image file that is smoothscaled copy of an input file</font></td><td>write an image file that is smoothscaled copy of an input file</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.fastevents.main">pygame.examples.fastevents.main</a> - <font size=-1>stress test the fastevents module</font></td><td>stress test the fastevents module</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.overlay.main">pygame.examples.overlay.main</a> - <font size=-1>play a .pgm video using overlays</font></td><td>play a .pgm video using overlays</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.blend_fill.main">pygame.examples.blend_fill.main</a> - <font size=-1>demonstrate the various surface.fill method blend options</font></td><td>demonstrate the various surface.fill method blend options</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.cursors.main">pygame.examples.cursors.main</a> - <font size=-1>display two different custom cursors</font></td><td>display two different custom cursors</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.pixelarray.main">pygame.examples.pixelarray.main</a> - <font size=-1>display various pixelarray generated effects</font></td><td>display various pixelarray generated effects</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.scaletest.main">pygame.examples.scaletest.main</a> - <font size=-1>interactively scale an image using smoothscale</font></td><td>interactively scale an image using smoothscale</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.midi.main">pygame.examples.midi.main</a> - <font size=-1>run a midi example</font></td><td>run a midi example</td></tr>
-  <tr><td><a href="examples.html#pygame.examples.scroll.main">pygame.examples.scroll.main</a> - <font size=-1>run a Surface.scroll example that shows a magnified image</font></td><td>run a Surface.scroll example that shows a magnified image</td></tr>
-</table></small></ul>
-<p>These examples should help get you started with pygame. Here is a brief rundown of what you get. The source code for these examples is in the public domain. Feel free to use for your own projects. </p>
-<p>These examples can be run as stand-alone programs, or as described below, by importing the module and calling its main(). </p>
-<p>Resources for the examples are found in the pygame/examples/data subdirectory. </p>
-<p>We're always on the lookout for more examples and/or example requests. Code like this is probably the best way to start getting involved with python gaming. </p>
-<p>This page is adapted from the original examples <tt>readme.txt</tt> by: </p>
-<pre>    Pete Shinners
-    shredwheat@mediaone.net
-</pre><p>Further references </p>
-<pre>  pySDL    : <a href="http://pysdl.sourceforge.net">http://pysdl.sourceforge.net<a/>
-  SDL      : <a href="http://www.libsdl.org">http://www.libsdl.org<a/>
-  aliens.c : <a href="http://www.libsdl.org/projects/aliens">http://www.libsdl.org/projects/aliens<a/>
-</pre><p>examples as a package is new to pygame <tt>1.9.0</tt>. </p>
-<!--COMMENTS:pygame.examples--> &nbsp;<br> 
-
-
-<a name="pygame.examples.aliens.main">
-<big><b>pygame.examples.aliens.main</big></b><br><ul>
-  <i>play the full aliens example</i><br>
-  <tt>pygame.aliens.main(): return None</tt><br>
-<p>This started off as a port of the <tt>SDL</tt> demonstration, Aliens. Now it has evolved into something sort of resembling fun. This demonstrates a lot of different uses of sprites and optimized blitting. Also transparency, colorkeys, fonts, sound, music, joystick, and more. <tt>(PS</tt>, my high score is 117! goodluck) </p>
-<!--COMMENTS:pygame.examples.aliens.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.oldalien.main">
-<big><b>pygame.examples.oldalien.main</big></b><br><ul>
-  <i>play the original aliens example</i><br>
-  <tt>pygame.examples.oldalien.main(): return None</tt><br>
-<p>This more closely resembles a port of the <tt>SDL</tt> Aliens demo. The code is a lot simpler, so it makes a better starting point for people looking at code for the first times. These blitting routines are not as optimized as they should/could be, but the code is easier to follow, and it plays quick enough. </p>
-<!--COMMENTS:pygame.examples.oldalien.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.stars.main">
-<big><b>pygame.examples.stars.main</big></b><br><ul>
-  <i>run a simple starfield example</i><br>
-  <tt>pygame.examples.stars.main(): return None</tt><br>
-<p><tt>A</tt> simple starfield example. You can change the center of perspective by leftclicking the mouse on the screen. </p>
-<!--COMMENTS:pygame.examples.stars.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.chimp.main">
-<big><b>pygame.examples.chimp.main</big></b><br><ul>
-  <i>hit the moving chimp</i><br>
-  <tt>pygame.examples.chimp.main(): return None</tt><br>
-<p>This simple example is derived from the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial. </p>
-<!--COMMENTS:pygame.examples.chimp.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.moveit.main">
-<big><b>pygame.examples.moveit.main</big></b><br><ul>
-  <i>display animated objects on the screen</i><br>
-  <tt>pygame.examples.moveit.main(): return None</tt><br>
-<p>This is the full and final example from the Pygame Tutorial, "How Do <tt>I</tt> Make It Move". It creates 10 objects and animates them on the screen. </p>
-<p>Note it's a bit scant on error checking, but it's easy to read. :] Fortunately, this is python, and we needn't wrestle with a pile of error codes. </p>
-<!--COMMENTS:pygame.examples.moveit.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.fonty.main">
-<big><b>pygame.examples.fonty.main</big></b><br><ul>
-  <i>run a font rendering example</i><br>
-  <tt>pygame.examples.fonty.main(): return None</tt><br>
-<p>Super quick, super simple application demonstrating the different ways to render fonts with the font module </p>
-<!--COMMENTS:pygame.examples.fonty.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.vgrade.main">
-<big><b>pygame.examples.vgrade.main</big></b><br><ul>
-  <i>display a vertical gradient</i><br>
-  <tt>pygame.examples.vgrade.main(): return None</tt><br>
-<p>Demonstrates creating a vertical gradient with NumPy python. The app will create a new gradient every half second and report the time needed to create and display the image. If you're not prepared to start working with the NumPy arrays, don't worry about the source for this one :] </p>
-<!--COMMENTS:pygame.examples.vgrade.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.eventlist.main">
-<big><b>pygame.examples.eventlist.main</big></b><br><ul>
-  <i>display pygame events</i><br>
-  <tt>pygame.examples.eventlist.main(): return None</tt><br>
-<p>Eventlist is a sloppy style of pygame, but is a handy tool for learning about pygame events and input. At the top of the screen are the state of several device values, and a scrolling list of events are displayed on the bottom. </p>
-<p>This is not quality 'ui' code at all, but you can see how to implement very non-interactive status displays, or even a crude text output control. </p>
-<!--COMMENTS:pygame.examples.eventlist.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.arraydemo.main">
-<big><b>pygame.examples.arraydemo.main</big></b><br><ul>
-  <i>show various surfarray effects</i><br>
-  <tt>pygame.examples.arraydemo.main(arraytype=None): return None</tt><br>
-<p>Another example filled with various surfarray effects. It requires the surfarray and image modules to be installed. This little demo can also make a good starting point for any of your own tests with surfarray </p>
-<p>If arraytype is provided then use that array package. Valid values are 'numeric' or 'numpy'. Otherwise default to NumPy, or fall back on Numeric if NumPy is not installed. As a program <tt>surfarray.py</tt> accepts an optional --numeric or --numpy flag. (New pygame <tt>1.9.0)</tt> </p>
-<!--COMMENTS:pygame.examples.arraydemo.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.sound.main">
-<big><b>pygame.examples.sound.main</big></b><br><ul>
-  <i>load and play a sound</i><br>
-  <tt>pygame.examples.sound.main(file_path=None): return None</tt><br>
-<p>Extremely basic testing of the mixer module. Load a sound and play it. All from the command shell, no graphics. </p>
-<p>If provided, use the audio file 'file_path', otherwise use a default file. </p>
-<p><tt>sound.py</tt> optional command line argument: an audio file </p>
-<!--COMMENTS:pygame.examples.sound.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.sound_array_demos.main">
-<big><b>pygame.examples.sound_array_demos.main</big></b><br><ul>
-  <i>play various sndarray effects</i><br>
-  <tt>pygame.examples.sound_array_demos.main(arraytype=None): return None</tt><br>
-<p>If arraytype is provided then use that array package. Valid values are 'numeric' or 'numpy'. Otherwise default to NumPy, or fall back on Numeric if NumPy is not installed. </p>
-<p>Uses sndarray and NumPy ( or Numeric) to create offset faded copies of the original sound. Currently it just uses hardcoded values for the number of echos and the delay. Easy for you to recreate as needed. Run as a program <tt>sound_array_demos.py</tt> takes an optional command line option, --numpy or --numeric, specifying which array package to use. </p>
-<!--COMMENTS:pygame.examples.sound_array_demos.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.liquid.main">
-<big><b>pygame.examples.liquid.main</big></b><br><ul>
-  <i>display an animated liquid effect</i><br>
-  <tt>pygame.examples.liquid.main(): return None</tt><br>
-<p>This example was created in a quick comparison with the BlitzBasic gaming language. Nonetheless, it demonstrates a quick 8-bit setup (with colormap). </p>
-<!--COMMENTS:pygame.examples.liquid.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.glcube.main">
-<big><b>pygame.examples.glcube.main</big></b><br><ul>
-  <i>display an animated 3D cube using OpenGL</i><br>
-  <tt>pygame.examples.glcube.main(): return None</tt><br>
-<p>Using PyOpenGL and pygame, this creates a spinning <tt>3D</tt> multicolored cube. </p>
-<!--COMMENTS:pygame.examples.glcube.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.scrap_clipboard.main">
-<big><b>pygame.examples.scrap_clipboard.main</big></b><br><ul>
-  <i>access the clipboard</i><br>
-  <tt>pygame.examples.scrap_clipboard.main(): return None</tt><br>
-<p><tt>A</tt> simple demonstration example for the clipboard support. </p>
-<!--COMMENTS:pygame.examples.scrap_clipboard.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.mask.main">
-<big><b>pygame.examples.mask.main</big></b><br><ul>
-  <i>display multiple images bounce off each other using collision detection</i><br>
-  <tt>pygame.examples.mask.main(*args): return None</tt><br>
-<p>Positional arguments: </p>
-<pre>    one or more image file names.
-</pre><p>This <tt>pygame.masks</tt> demo will display multiple moving sprites bouncing off each other. More than one sprite image can be provided. </p>
-<p>If run as a program then <tt>mask.py</tt> takes one or more image files as command line arguments. </p>
-<!--COMMENTS:pygame.examples.mask.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.testsprite.main">
-<big><b>pygame.examples.testsprite.main</big></b><br><ul>
-  <i>show lots of sprites moving around</i><br>
-  <tt>pygame.examples.testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0): return None</tt><br>
-<p>Optional keyword arguments: </p>
-<pre>    update_rects - use the RenderUpdate sprite group class
-    use_static - include non-moving images
-    use_FastRenderGroup - Use the FastRenderGroup sprite group
-    screen_dims - pygame window dimensions
-    use_alpha - use alpha blending
-    flags - additional display mode flags
-</pre><p>Like the <tt>testsprite.c</tt> that comes with sdl, this pygame version shows lots of sprites moving around. </p>
-<p>If run as a stand-alone program then no command line arguments are taken. </p>
-<!--COMMENTS:pygame.examples.testsprite.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.headless_no_windows_needed.main">
-<big><b>pygame.examples.headless_no_windows_needed.main</big></b><br><ul>
-  <i>write an image file that is smoothscaled copy of an input file</i><br>
-  <tt>pygame.examples.headless_no_windows_needed.main(fin, fout, w, h): return None</tt><br>
-<p>arguments: </p>
-<pre>    fin - name of an input image file
-    fout - name of the output file to create/overwrite
-    w, h - size of the rescaled image, as integer width and height
-</pre><p>How to use pygame with no windowing system, like on headless servers. </p>
-<p>Thumbnail generation with scaling is an example of what you can do with pygame. </p>
-<p><tt>NOTE:</tt> the pygame scale function uses mmx/sse if available, and can be run in multiple threads. </p>
-<p>If <tt>headless_no_windows_needed.py</tt> is run as a program it takes the following command line arguments: </p>
-<pre>    -scale inputimage outputimage new_width new_height
-    eg. -scale in.png outpng 50 50
-</pre>
-<!--COMMENTS:pygame.examples.headless_no_windows_needed.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.fastevents.main">
-<big><b>pygame.examples.fastevents.main</big></b><br><ul>
-  <i>stress test the fastevents module</i><br>
-  <tt>pygame.examples.fastevents.main(): return None</tt><br>
-<p>This is a stress test for the fastevents module. </p>
-<ul>
- <li>Fast events does not appear faster!</li>
- <li> </li>
-</ul>
-<p>So far it looks like normal <tt>pygame.event</tt> is faster by up to two times. So maybe fastevent isn't fast at all. </p>
-<p>Tested on windowsXP sp2 athlon, and freebsd. </p>
-<p><tt>However..</tt>. on my debian duron 850 machine fastevents is faster. </p>
-<!--COMMENTS:pygame.examples.fastevents.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.overlay.main">
-<big><b>pygame.examples.overlay.main</big></b><br><ul>
-  <i>play a .pgm video using overlays</i><br>
-  <tt>pygame.examples.overlay.main(fname): return None</tt><br>
-<p>Play the .pgm video fila a path fname. </p>
-<p>If run as a program <tt>overlay.py</tt> takes the file name as a command line argument. </p>
-<!--COMMENTS:pygame.examples.overlay.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.blend_fill.main">
-<big><b>pygame.examples.blend_fill.main</big></b><br><ul>
-  <i>demonstrate the various surface.fill method blend options</i><br>
-  <tt>pygame.examples.blend_fill.main(): return None</tt><br>
-<p><tt>A</tt> interactive demo that lets one choose which BLEND_xxx option to apply to a surface. </p>
-<!--COMMENTS:pygame.examples.blend_fill.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.cursors.main">
-<big><b>pygame.examples.cursors.main</big></b><br><ul>
-  <i>display two different custom cursors</i><br>
-  <tt>pygame.examples.cursors.main(): return None</tt><br>
-<p>Display an arrow or circle with crossbar cursor. </p>
-<!--COMMENTS:pygame.examples.cursors.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.pixelarray.main">
-<big><b>pygame.examples.pixelarray.main</big></b><br><ul>
-  <i>display various pixelarray generated effects</i><br>
-  <tt>pygame.examples.pixelarray.main(): return None</tt><br>
-<p>Display various pixelarray generated effects. </p>
-<!--COMMENTS:pygame.examples.pixelarray.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.scaletest.main">
-<big><b>pygame.examples.scaletest.main</big></b><br><ul>
-  <i>interactively scale an image using smoothscale</i><br>
-  <tt>pygame.examples.scaletest.main(imagefile, convert_alpha=False, run_speed_test=True): return None</tt><br>
-<p>arguments: </p>
-<pre>    imagefile - file name of source image (required)
-    convert_alpha - use convert_alpha() on the surf (default False)
-    run_speed_test - (default False)
-</pre><p><tt>A</tt> smoothscale example that resized an image on the screen. Vertical and horizontal arrow keys are used to change the width and height of the displayed image. If the convert_alpha option is True then the source image is forced to have source alpha, whether or not the original images does. If run_speed_test is True then a background timing test is performed instead of the interactive scaler. </p>
-<p>If <tt>scaletest.py</tt> is run as a program then the command line options are: </p>
-<pre>    ImageFile [-t] [-convert_alpha]
-    [-t] = Run Speed Test
-    [-convert_alpha] = Use convert_alpha() on the surf.
-</pre>
-<!--COMMENTS:pygame.examples.scaletest.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.midi.main">
-<big><b>pygame.examples.midi.main</big></b><br><ul>
-  <i>run a midi example</i><br>
-  <tt>pygame.examples.midi.main(mode='output', device_id=None): return None</tt><br>
-<p>Arguments: </p>
-<pre>    mode - if 'output' run a midi keyboard output example
-              'input' run a midi event logger input example
-              'list' list available midi devices
-           (default 'output')
-    device_id - midi device number; if None then use the default midi input or
-                output device for the system
-</pre><p>The output example shows how to translate mouse clicks or computer keyboard events into midi notes. It implements a rudimentary button widget and state machine. </p>
-<p>The input example shows how to translate midi input to pygame events. </p>
-<p>With the use of a virtual midi patch cord the output and input examples can be run as separate processes and connected so the keyboard output is displayed on a console. </p>
-<p>new to pygame <tt>1.9.0</tt> </p>
-<!--COMMENTS:pygame.examples.midi.main--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.examples.scroll.main">
-<big><b>pygame.examples.scroll.main</big></b><br><ul>
-  <i>run a Surface.scroll example that shows a magnified image</i><br>
-  <tt>pygame.examples.scroll.main(image_file=None): return None</tt><br>
-<p>This example shows a scrollable image that has a zoom factor of eight. It uses the <tt>Surface.scroll</tt> function to shift the image on the display surface. <tt>A</tt> clip rectangle protects a margin area. If called as a function, the example accepts an optional image file path. If run as a program it takes an optional file path command line argument. If no file is provided a default image file is used. </p>
-<p>When running click on a black triangle to move one pixel in the direction the triangle points. Or use the arrow keys. Close the window or press <tt>ESC</tt> to quit. </p>
-<!--COMMENTS:pygame.examples.scroll.main--> &nbsp;<br> 
-<br></ul>
-<br></ul>
-
-</body></html>
+
+<html>
+<title>examples - Pygame Documentation</title>
+<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>
+
+
+<table cellpadding=0 cellspacing=0 border=0 style='border: 3px solid black;' width='100%'>
+<tr>
+<td bgcolor='#c2fc20' style='padding: 6px;' align=center valign=center><a href='http://www.pygame.org/'><img src='../pygame_tiny.gif' border=0 width=200 height=60></a><br><b>pygame documentation</b></td>
+<td bgcolor='#6aee28' style='border-left: 3px solid black; padding: 6px;' align=center valign=center>
+	||&nbsp;
+	<a href=http://www.pygame.org>Pygame Home</a> &nbsp;||&nbsp;
+	<a href=../index.html>Help Contents</a> &nbsp;||
+	<a href=index.html>Reference Index</a> &nbsp;||
+	<br>&nbsp;<br>
+	
+<a href="camera.html">Camera</a>&nbsp;||&nbsp;
+<a href="cdrom.html">Cdrom</a>&nbsp;||&nbsp;
+<a href="color.html">Color</a>&nbsp;||&nbsp;
+<a href="cursors.html">Cursors</a>&nbsp;||&nbsp;
+<a href="display.html">Display</a>&nbsp;||&nbsp;
+<a href="draw.html">Draw</a>&nbsp;||&nbsp;
+<a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
+<a href="font.html">Font</a>&nbsp;||&nbsp;
+<a href="image.html">Image</a>&nbsp;||&nbsp;
+<a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
+<a href="key.html">Key</a>&nbsp;||&nbsp;
+<a href="locals.html">Locals</a>&nbsp;||&nbsp;
+<a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="midi.html">Midi</a>&nbsp;||&nbsp;
+<a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
+<a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
+<a href="movie.html">Movie</a>&nbsp;||&nbsp;
+<a href="music.html">Music</a>&nbsp;||&nbsp;
+<a href="overlay.html">Overlay</a>&nbsp;||&nbsp;
+<a href="pixelarray.html">Pixelarray</a>&nbsp;||&nbsp;
+<a href="pygame.html">Pygame</a>&nbsp;||&nbsp;
+<a href="rect.html">Rect</a>&nbsp;||&nbsp;
+<a href="scrap.html">Scrap</a>&nbsp;||&nbsp;
+<a href="sndarray.html">Sndarray</a>&nbsp;||&nbsp;
+<a href="sprite.html">Sprite</a>&nbsp;||&nbsp;
+<a href="surface.html">Surface</a>&nbsp;||&nbsp;
+<a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;
+<a href="tests.html">Tests</a>&nbsp;||&nbsp;
+<a href="time.html">Time</a>&nbsp;||&nbsp;
+<a href="transform.html">Transform</a>
+</td></tr></table>
+<br>
+
+
+<a name="pygame.examples">
+<big><b>pygame.examples</big></b><br><ul>
+  <i>module of example programs</i><br>
+<ul><small><table>
+  <tr><td><a href="examples.html#pygame.examples.aliens.main">pygame.examples.aliens.main</a> - <font size=-1>play the full aliens example</font></td><td>play the full aliens example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.oldalien.main">pygame.examples.oldalien.main</a> - <font size=-1>play the original aliens example</font></td><td>play the original aliens example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.stars.main">pygame.examples.stars.main</a> - <font size=-1>run a simple starfield example</font></td><td>run a simple starfield example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.chimp.main">pygame.examples.chimp.main</a> - <font size=-1>hit the moving chimp</font></td><td>hit the moving chimp</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.moveit.main">pygame.examples.moveit.main</a> - <font size=-1>display animated objects on the screen</font></td><td>display animated objects on the screen</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.fonty.main">pygame.examples.fonty.main</a> - <font size=-1>run a font rendering example</font></td><td>run a font rendering example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.vgrade.main">pygame.examples.vgrade.main</a> - <font size=-1>display a vertical gradient</font></td><td>display a vertical gradient</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.eventlist.main">pygame.examples.eventlist.main</a> - <font size=-1>display pygame events</font></td><td>display pygame events</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.arraydemo.main">pygame.examples.arraydemo.main</a> - <font size=-1>show various surfarray effects</font></td><td>show various surfarray effects</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.sound.main">pygame.examples.sound.main</a> - <font size=-1>load and play a sound</font></td><td>load and play a sound</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.sound_array_demos.main">pygame.examples.sound_array_demos.main</a> - <font size=-1>play various sndarray effects</font></td><td>play various sndarray effects</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.liquid.main">pygame.examples.liquid.main</a> - <font size=-1>display an animated liquid effect</font></td><td>display an animated liquid effect</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.glcube.main">pygame.examples.glcube.main</a> - <font size=-1>display an animated 3D cube using OpenGL</font></td><td>display an animated 3D cube using OpenGL</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.scrap_clipboard.main">pygame.examples.scrap_clipboard.main</a> - <font size=-1>access the clipboard</font></td><td>access the clipboard</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.mask.main">pygame.examples.mask.main</a> - <font size=-1>display multiple images bounce off each other using collision detection</font></td><td>display multiple images bounce off each other using collision detection</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.testsprite.main">pygame.examples.testsprite.main</a> - <font size=-1>show lots of sprites moving around</font></td><td>show lots of sprites moving around</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.headless_no_windows_needed.main">pygame.examples.headless_no_windows_needed.main</a> - <font size=-1>write an image file that is smoothscaled copy of an input file</font></td><td>write an image file that is smoothscaled copy of an input file</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.fastevents.main">pygame.examples.fastevents.main</a> - <font size=-1>stress test the fastevents module</font></td><td>stress test the fastevents module</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.overlay.main">pygame.examples.overlay.main</a> - <font size=-1>play a .pgm video using overlays</font></td><td>play a .pgm video using overlays</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.blend_fill.main">pygame.examples.blend_fill.main</a> - <font size=-1>demonstrate the various surface.fill method blend options</font></td><td>demonstrate the various surface.fill method blend options</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.cursors.main">pygame.examples.cursors.main</a> - <font size=-1>display two different custom cursors</font></td><td>display two different custom cursors</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.pixelarray.main">pygame.examples.pixelarray.main</a> - <font size=-1>display various pixelarray generated effects</font></td><td>display various pixelarray generated effects</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.scaletest.main">pygame.examples.scaletest.main</a> - <font size=-1>interactively scale an image using smoothscale</font></td><td>interactively scale an image using smoothscale</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.midi.main">pygame.examples.midi.main</a> - <font size=-1>run a midi example</font></td><td>run a midi example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.scroll.main">pygame.examples.scroll.main</a> - <font size=-1>run a Surface.scroll example that shows a magnified image</font></td><td>run a Surface.scroll example that shows a magnified image</td></tr>
+</table></small></ul>
+<p>These examples should help get you started with pygame. Here is a brief rundown of what you get. The source code for these examples is in the public domain. Feel free to use for your own projects. </p>
+<p>These examples can be run as stand-alone programs, or as described below, by importing the module and calling its main(). </p>
+<p>Resources for the examples are found in the pygame/examples/data subdirectory. </p>
+<p>We're always on the lookout for more examples and/or example requests. Code like this is probably the best way to start getting involved with python gaming. </p>
+<p>This page is adapted from the original examples <tt>readme.txt</tt> by: </p>
+<pre>    Pete Shinners
+    shredwheat@mediaone.net
+</pre><p>Further references </p>
+<pre>  pySDL    : <a href="http://pysdl.sourceforge.net">http://pysdl.sourceforge.net<a/>
+  SDL      : <a href="http://www.libsdl.org">http://www.libsdl.org<a/>
+  aliens.c : <a href="http://www.libsdl.org/projects/aliens">http://www.libsdl.org/projects/aliens<a/>
+</pre><p>examples as a package is new to pygame <tt>1.9.0</tt>. </p>
+<!--COMMENTS:pygame.examples--> &nbsp;<br> 
+
+
+<a name="pygame.examples.aliens.main">
+<big><b>pygame.examples.aliens.main</big></b><br><ul>
+  <i>play the full aliens example</i><br>
+  <tt>pygame.aliens.main(): return None</tt><br>
+<p>This started off as a port of the <tt>SDL</tt> demonstration, Aliens. Now it has evolved into something sort of resembling fun. This demonstrates a lot of different uses of sprites and optimized blitting. Also transparency, colorkeys, fonts, sound, music, joystick, and more. <tt>(PS</tt>, my high score is 117! goodluck) </p>
+<!--COMMENTS:pygame.examples.aliens.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.oldalien.main">
+<big><b>pygame.examples.oldalien.main</big></b><br><ul>
+  <i>play the original aliens example</i><br>
+  <tt>pygame.examples.oldalien.main(): return None</tt><br>
+<p>This more closely resembles a port of the <tt>SDL</tt> Aliens demo. The code is a lot simpler, so it makes a better starting point for people looking at code for the first times. These blitting routines are not as optimized as they should/could be, but the code is easier to follow, and it plays quick enough. </p>
+<!--COMMENTS:pygame.examples.oldalien.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.stars.main">
+<big><b>pygame.examples.stars.main</big></b><br><ul>
+  <i>run a simple starfield example</i><br>
+  <tt>pygame.examples.stars.main(): return None</tt><br>
+<p><tt>A</tt> simple starfield example. You can change the center of perspective by leftclicking the mouse on the screen. </p>
+<!--COMMENTS:pygame.examples.stars.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.chimp.main">
+<big><b>pygame.examples.chimp.main</big></b><br><ul>
+  <i>hit the moving chimp</i><br>
+  <tt>pygame.examples.chimp.main(): return None</tt><br>
+<p>This simple example is derived from the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial. </p>
+<!--COMMENTS:pygame.examples.chimp.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.moveit.main">
+<big><b>pygame.examples.moveit.main</big></b><br><ul>
+  <i>display animated objects on the screen</i><br>
+  <tt>pygame.examples.moveit.main(): return None</tt><br>
+<p>This is the full and final example from the Pygame Tutorial, "How Do <tt>I</tt> Make It Move". It creates 10 objects and animates them on the screen. </p>
+<p>Note it's a bit scant on error checking, but it's easy to read. :] Fortunately, this is python, and we needn't wrestle with a pile of error codes. </p>
+<!--COMMENTS:pygame.examples.moveit.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.fonty.main">
+<big><b>pygame.examples.fonty.main</big></b><br><ul>
+  <i>run a font rendering example</i><br>
+  <tt>pygame.examples.fonty.main(): return None</tt><br>
+<p>Super quick, super simple application demonstrating the different ways to render fonts with the font module </p>
+<!--COMMENTS:pygame.examples.fonty.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.vgrade.main">
+<big><b>pygame.examples.vgrade.main</big></b><br><ul>
+  <i>display a vertical gradient</i><br>
+  <tt>pygame.examples.vgrade.main(): return None</tt><br>
+<p>Demonstrates creating a vertical gradient with NumPy python. The app will create a new gradient every half second and report the time needed to create and display the image. If you're not prepared to start working with the NumPy arrays, don't worry about the source for this one :] </p>
+<!--COMMENTS:pygame.examples.vgrade.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.eventlist.main">
+<big><b>pygame.examples.eventlist.main</big></b><br><ul>
+  <i>display pygame events</i><br>
+  <tt>pygame.examples.eventlist.main(): return None</tt><br>
+<p>Eventlist is a sloppy style of pygame, but is a handy tool for learning about pygame events and input. At the top of the screen are the state of several device values, and a scrolling list of events are displayed on the bottom. </p>
+<p>This is not quality 'ui' code at all, but you can see how to implement very non-interactive status displays, or even a crude text output control. </p>
+<!--COMMENTS:pygame.examples.eventlist.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.arraydemo.main">
+<big><b>pygame.examples.arraydemo.main</big></b><br><ul>
+  <i>show various surfarray effects</i><br>
+  <tt>pygame.examples.arraydemo.main(arraytype=None): return None</tt><br>
+<p>Another example filled with various surfarray effects. It requires the surfarray and image modules to be installed. This little demo can also make a good starting point for any of your own tests with surfarray </p>
+<p>If arraytype is provided then use that array package. Valid values are 'numeric' or 'numpy'. Otherwise default to NumPy, or fall back on Numeric if NumPy is not installed. As a program <tt>surfarray.py</tt> accepts an optional --numeric or --numpy flag. (New pygame <tt>1.9.0)</tt> </p>
+<!--COMMENTS:pygame.examples.arraydemo.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.sound.main">
+<big><b>pygame.examples.sound.main</big></b><br><ul>
+  <i>load and play a sound</i><br>
+  <tt>pygame.examples.sound.main(file_path=None): return None</tt><br>
+<p>Extremely basic testing of the mixer module. Load a sound and play it. All from the command shell, no graphics. </p>
+<p>If provided, use the audio file 'file_path', otherwise use a default file. </p>
+<p><tt>sound.py</tt> optional command line argument: an audio file </p>
+<!--COMMENTS:pygame.examples.sound.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.sound_array_demos.main">
+<big><b>pygame.examples.sound_array_demos.main</big></b><br><ul>
+  <i>play various sndarray effects</i><br>
+  <tt>pygame.examples.sound_array_demos.main(arraytype=None): return None</tt><br>
+<p>If arraytype is provided then use that array package. Valid values are 'numeric' or 'numpy'. Otherwise default to NumPy, or fall back on Numeric if NumPy is not installed. </p>
+<p>Uses sndarray and NumPy ( or Numeric) to create offset faded copies of the original sound. Currently it just uses hardcoded values for the number of echos and the delay. Easy for you to recreate as needed. Run as a program <tt>sound_array_demos.py</tt> takes an optional command line option, --numpy or --numeric, specifying which array package to use. </p>
+<!--COMMENTS:pygame.examples.sound_array_demos.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.liquid.main">
+<big><b>pygame.examples.liquid.main</big></b><br><ul>
+  <i>display an animated liquid effect</i><br>
+  <tt>pygame.examples.liquid.main(): return None</tt><br>
+<p>This example was created in a quick comparison with the BlitzBasic gaming language. Nonetheless, it demonstrates a quick 8-bit setup (with colormap). </p>
+<!--COMMENTS:pygame.examples.liquid.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.glcube.main">
+<big><b>pygame.examples.glcube.main</big></b><br><ul>
+  <i>display an animated 3D cube using OpenGL</i><br>
+  <tt>pygame.examples.glcube.main(): return None</tt><br>
+<p>Using PyOpenGL and pygame, this creates a spinning <tt>3D</tt> multicolored cube. </p>
+<!--COMMENTS:pygame.examples.glcube.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.scrap_clipboard.main">
+<big><b>pygame.examples.scrap_clipboard.main</big></b><br><ul>
+  <i>access the clipboard</i><br>
+  <tt>pygame.examples.scrap_clipboard.main(): return None</tt><br>
+<p><tt>A</tt> simple demonstration example for the clipboard support. </p>
+<!--COMMENTS:pygame.examples.scrap_clipboard.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.mask.main">
+<big><b>pygame.examples.mask.main</big></b><br><ul>
+  <i>display multiple images bounce off each other using collision detection</i><br>
+  <tt>pygame.examples.mask.main(*args): return None</tt><br>
+<p>Positional arguments: </p>
+<pre>    one or more image file names.
+</pre><p>This <tt>pygame.masks</tt> demo will display multiple moving sprites bouncing off each other. More than one sprite image can be provided. </p>
+<p>If run as a program then <tt>mask.py</tt> takes one or more image files as command line arguments. </p>
+<!--COMMENTS:pygame.examples.mask.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.testsprite.main">
+<big><b>pygame.examples.testsprite.main</big></b><br><ul>
+  <i>show lots of sprites moving around</i><br>
+  <tt>pygame.examples.testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0): return None</tt><br>
+<p>Optional keyword arguments: </p>
+<pre>    update_rects - use the RenderUpdate sprite group class
+    use_static - include non-moving images
+    use_FastRenderGroup - Use the FastRenderGroup sprite group
+    screen_dims - pygame window dimensions
+    use_alpha - use alpha blending
+    flags - additional display mode flags
+</pre><p>Like the <tt>testsprite.c</tt> that comes with sdl, this pygame version shows lots of sprites moving around. </p>
+<p>If run as a stand-alone program then no command line arguments are taken. </p>
+<!--COMMENTS:pygame.examples.testsprite.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.headless_no_windows_needed.main">
+<big><b>pygame.examples.headless_no_windows_needed.main</big></b><br><ul>
+  <i>write an image file that is smoothscaled copy of an input file</i><br>
+  <tt>pygame.examples.headless_no_windows_needed.main(fin, fout, w, h): return None</tt><br>
+<p>arguments: </p>
+<pre>    fin - name of an input image file
+    fout - name of the output file to create/overwrite
+    w, h - size of the rescaled image, as integer width and height
+</pre><p>How to use pygame with no windowing system, like on headless servers. </p>
+<p>Thumbnail generation with scaling is an example of what you can do with pygame. </p>
+<p><tt>NOTE:</tt> the pygame scale function uses mmx/sse if available, and can be run in multiple threads. </p>
+<p>If <tt>headless_no_windows_needed.py</tt> is run as a program it takes the following command line arguments: </p>
+<pre>    -scale inputimage outputimage new_width new_height
+    eg. -scale in.png outpng 50 50
+</pre>
+<!--COMMENTS:pygame.examples.headless_no_windows_needed.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.fastevents.main">
+<big><b>pygame.examples.fastevents.main</big></b><br><ul>
+  <i>stress test the fastevents module</i><br>
+  <tt>pygame.examples.fastevents.main(): return None</tt><br>
+<p>This is a stress test for the fastevents module. </p>
+<ul>
+ <li>Fast events does not appear faster!</li>
+ <li> </li>
+</ul>
+<p>So far it looks like normal <tt>pygame.event</tt> is faster by up to two times. So maybe fastevent isn't fast at all. </p>
+<p>Tested on windowsXP sp2 athlon, and freebsd. </p>
+<p><tt>However..</tt>. on my debian duron 850 machine fastevents is faster. </p>
+<!--COMMENTS:pygame.examples.fastevents.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.overlay.main">
+<big><b>pygame.examples.overlay.main</big></b><br><ul>
+  <i>play a .pgm video using overlays</i><br>
+  <tt>pygame.examples.overlay.main(fname): return None</tt><br>
+<p>Play the .pgm video fila a path fname. </p>
+<p>If run as a program <tt>overlay.py</tt> takes the file name as a command line argument. </p>
+<!--COMMENTS:pygame.examples.overlay.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.blend_fill.main">
+<big><b>pygame.examples.blend_fill.main</big></b><br><ul>
+  <i>demonstrate the various surface.fill method blend options</i><br>
+  <tt>pygame.examples.blend_fill.main(): return None</tt><br>
+<p><tt>A</tt> interactive demo that lets one choose which BLEND_xxx option to apply to a surface. </p>
+<!--COMMENTS:pygame.examples.blend_fill.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.cursors.main">
+<big><b>pygame.examples.cursors.main</big></b><br><ul>
+  <i>display two different custom cursors</i><br>
+  <tt>pygame.examples.cursors.main(): return None</tt><br>
+<p>Display an arrow or circle with crossbar cursor. </p>
+<!--COMMENTS:pygame.examples.cursors.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.pixelarray.main">
+<big><b>pygame.examples.pixelarray.main</big></b><br><ul>
+  <i>display various pixelarray generated effects</i><br>
+  <tt>pygame.examples.pixelarray.main(): return None</tt><br>
+<p>Display various pixelarray generated effects. </p>
+<!--COMMENTS:pygame.examples.pixelarray.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.scaletest.main">
+<big><b>pygame.examples.scaletest.main</big></b><br><ul>
+  <i>interactively scale an image using smoothscale</i><br>
+  <tt>pygame.examples.scaletest.main(imagefile, convert_alpha=False, run_speed_test=True): return None</tt><br>
+<p>arguments: </p>
+<pre>    imagefile - file name of source image (required)
+    convert_alpha - use convert_alpha() on the surf (default False)
+    run_speed_test - (default False)
+</pre><p><tt>A</tt> smoothscale example that resized an image on the screen. Vertical and horizontal arrow keys are used to change the width and height of the displayed image. If the convert_alpha option is True then the source image is forced to have source alpha, whether or not the original images does. If run_speed_test is True then a background timing test is performed instead of the interactive scaler. </p>
+<p>If <tt>scaletest.py</tt> is run as a program then the command line options are: </p>
+<pre>    ImageFile [-t] [-convert_alpha]
+    [-t] = Run Speed Test
+    [-convert_alpha] = Use convert_alpha() on the surf.
+</pre>
+<!--COMMENTS:pygame.examples.scaletest.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.midi.main">
+<big><b>pygame.examples.midi.main</big></b><br><ul>
+  <i>run a midi example</i><br>
+  <tt>pygame.examples.midi.main(mode='output', device_id=None): return None</tt><br>
+<p>Arguments: </p>
+<pre>    mode - if 'output' run a midi keyboard output example
+              'input' run a midi event logger input example
+              'list' list available midi devices
+           (default 'output')
+    device_id - midi device number; if None then use the default midi input or
+                output device for the system
+</pre><p>The output example shows how to translate mouse clicks or computer keyboard events into midi notes. It implements a rudimentary button widget and state machine. </p>
+<p>The input example shows how to translate midi input to pygame events. </p>
+<p>With the use of a virtual midi patch cord the output and input examples can be run as separate processes and connected so the keyboard output is displayed on a console. </p>
+<p>new to pygame <tt>1.9.0</tt> </p>
+<!--COMMENTS:pygame.examples.midi.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.scroll.main">
+<big><b>pygame.examples.scroll.main</big></b><br><ul>
+  <i>run a Surface.scroll example that shows a magnified image</i><br>
+  <tt>pygame.examples.scroll.main(image_file=None): return None</tt><br>
+<p>This example shows a scrollable image that has a zoom factor of eight. It uses the <tt>Surface.scroll</tt> function to shift the image on the display surface. <tt>A</tt> clip rectangle protects a margin area. If called as a function, the example accepts an optional image file path. If run as a program it takes an optional file path command line argument. If no file is provided a default image file is used. </p>
+<p>When running click on a black triangle to move one pixel in the direction the triangle points. Or use the arrow keys. Close the window or press <tt>ESC</tt> to quit. </p>
+<!--COMMENTS:pygame.examples.scroll.main--> &nbsp;<br> 
+<br></ul>
+<br></ul>
+
+</body></html>

docs/ref/index.html

 
 <li><a href="pygame.html#pygame">pygame</a> - <font size=-1>the top level pygame package</font></li>
 <ul>
-<li><a href="pygame.html#pygame.error">pygame.error</a> - <font size=-1>standard pygame exception</font></li>
-<li><a href="pygame.html#pygame.get_error">pygame.get_error</a> - <font size=-1>get the current error message</font></li>
-<li><a href="pygame.html#pygame.get_sdl_byteorder">pygame.get_sdl_byteorder</a> - <font size=-1>get the byte order of SDL</font></li>
-<li><a href="pygame.html#pygame.get_sdl_version">pygame.get_sdl_version</a> - <font size=-1>get the version number of SDL</font></li>
-<li><a href="pygame.html#pygame.init">pygame.init</a> - <font size=-1>initialize all imported pygame modules</font></li>
+<li><a href="color.html#pygame.Color">pygame.Color</a> - <font size=-1>pygame object for color representations</font></li>
+<ul>
+<li><a href="color.html#Color.a">Color.a</a> - <font size=-1>Gets or sets the alpha value of the Color.</font></li>
+<li><a href="color.html#Color.b">Color.b</a> - <font size=-1>Gets or sets the blue value of the Color.</font></li>
+<li><a href="color.html#Color.cmy">Color.cmy</a> - <font size=-1>Gets or sets the CMY representation of the Color.</font></li>
+<li><a href="color.html#Color.correct_gamma">Color.correct_gamma</a> - <font size=-1>Applies a certain gamma value to the Color.</font></li>
+<li><a href="color.html#Color.g">Color.g</a> - <font size=-1>Gets or sets the green value of the Color.</font></li>
+<li><a href="color.html#Color.hsla">Color.hsla</a> - <font size=-1>Gets or sets the HSLA representation of the Color.</font></li>
+<li><a href="color.html#Color.hsva">Color.hsva</a> - <font size=-1>Gets or sets the HSVA representation of the Color.</font></li>
+<li><a href="color.html#Color.i1i2i3">Color.i1i2i3</a> - <font size=-1>Gets or sets the I1I2I3 representation of the Color.</font></li>
+<li><a href="color.html#Color.normalize">Color.normalize</a> - <font size=-1>Returns the normalized RGBA values of the Color.</font></li>
+<li><a href="color.html#Color.r">Color.r</a> - <font size=-1>Gets or sets the red value of the Color.</font></li>
+</ul>
+<li><a href="overlay.html#pygame.Overlay">pygame.Overlay</a> - <font size=-1>pygame object for video overlay graphics</font></li>
+<ul>
+<li><a href="overlay.html#Overlay.display">Overlay.display</a> - <font size=-1>set the overlay pixel data</font></li>
+<li><a href="overlay.html#Overlay.get_hardware">Overlay.get_hardware</a> - <font size=-1>test if the Overlay is hardware accelerated</font></li>
+<li><a href="overlay.html#Overlay.set_location">Overlay.set_location</a> - <font size=-1>control where the overlay is displayed</font></li>
+</ul>
+<li><a href="pixelarray.html#pygame.PixelArray">pygame.PixelArray</a> - <font size=-1>pygame object for direct pixel access of surfaces</font></li>
+<ul>
+<li><a href="pixelarray.html#PixelArray.compare">PixelArray.compare</a> - <font size=-1>Compares the PixelArray with another one.</font></li>
+<li><a href="pixelarray.html#PixelArray.extract">PixelArray.extract</a> - <font size=-1>Extracts the passed color from the PixelArray.</font></li>
+<li><a href="pixelarray.html#PixelArray.make_surface">PixelArray.make_surface</a> - <font size=-1>Creates a new Surface from the current PixelArray.</font></li>
+<li><a href="pixelarray.html#PixelArray.replace">PixelArray.replace</a> - <font size=-1>Replaces the passed color in the PixelArray with another one.</font></li>
+<li><a href="pixelarray.html#PixelArray.surface">PixelArray.surface</a> - <font size=-1>Gets the Surface the PixelArray uses.</font></li>
+</ul>
+<li><a href="rect.html#pygame.Rect">pygame.Rect</a> - <font size=-1>pygame object for storing rectangular coordinates</font></li>
+<ul>
+<li><a href="rect.html#Rect.clamp">Rect.clamp</a> - <font size=-1>moves the rectangle inside another</font></li>
+<li><a href="rect.html#Rect.clamp_ip">Rect.clamp_ip</a> - <font size=-1>moves the rectangle inside another, in place</font></li>
+<li><a href="rect.html#Rect.clip">Rect.clip</a> - <font size=-1>crops a rectangle inside another</font></li>
+<li><a href="rect.html#Rect.collidedict">Rect.collidedict</a> - <font size=-1>test if one rectangle in a dictionary intersects</font></li>
+<li><a href="rect.html#Rect.collidedictall">Rect.collidedictall</a> - <font size=-1>test if all rectangles in a dictionary intersect</font></li>
+<li><a href="rect.html#Rect.collidelist">Rect.collidelist</a> - <font size=-1>test if one rectangle in a list intersects</font></li>
+<li><a href="rect.html#Rect.collidelistall">Rect.collidelistall</a> - <font size=-1>test if all rectangles in a list intersect</font></li>
+<li><a href="rect.html#Rect.collidepoint">Rect.collidepoint</a> - <font size=-1>test if a point is inside a rectangle</font></li>
+<li><a href="rect.html#Rect.colliderect">Rect.colliderect</a> - <font size=-1>test if two rectangles overlap</font></li>
+<li><a href="rect.html#Rect.contains">Rect.contains</a> - <font size=-1>test if one rectangle is inside another</font></li>
+<li><a href="rect.html#Rect.copy">Rect.copy</a> - <font size=-1>copy the rectangle</font></li>
+<li><a href="rect.html#Rect.fit">Rect.fit</a> - <font size=-1>resize and move a rectangle with aspect ratio</font></li>
+<li><a href="rect.html#Rect.inflate">Rect.inflate</a> - <font size=-1>grow or shrink the rectangle size</font></li>
+<li><a href="rect.html#Rect.inflate_ip">Rect.inflate_ip</a> - <font size=-1>grow or shrink the rectangle size, in place</font></li>
+<li><a href="rect.html#Rect.move">Rect.move</a> - <font size=-1>moves the rectangle</font></li>
+<li><a href="rect.html#Rect.move_ip">Rect.move_ip</a> - <font size=-1>moves the rectangle, in place</font></li>
+<li><a href="rect.html#Rect.normalize">Rect.normalize</a> - <font size=-1>correct negative sizes</font></li>
+<li><a href="rect.html#Rect.union">Rect.union</a> - <font size=-1>joins two rectangles into one</font></li>
+<li><a href="rect.html#Rect.union_ip">Rect.union_ip</a> - <font size=-1>joins two rectangles into one, in place</font></li>
+<li><a href="rect.html#Rect.unionall">Rect.unionall</a> - <font size=-1>the union of many rectangles</font></li>
+<li><a href="rect.html#Rect.unionall_ip">Rect.unionall_ip</a> - <font size=-1>the union of many rectangles, in place</font></li>
+</ul>
+<li><a href="surface.html#pygame.Surface">pygame.Surface</a> - <font size=-1>pygame object for representing images</font></li>
+<ul>
+<li><a href="surface.html#Surface.blit">Surface.blit</a> - <font size=-1>draw one image onto another</font></li>
+<li><a href="surface.html#Surface.convert">Surface.convert</a> - <font size=-1>change the pixel format of an image</font></li>
+<li><a href="surface.html#Surface.convert_alpha">Surface.convert_alpha</a> - <font size=-1>change the pixel format of an image including per pixel alphas</font></li>
+<li><a href="surface.html#Surface.copy">Surface.copy</a> - <font size=-1>create a new copy of a Surface</font></li>
+<li><a href="surface.html#Surface.fill">Surface.fill</a> - <font size=-1>fill Surface with a solid color</font></li>
+<li><a href="surface.html#Surface.get_abs_offset">Surface.get_abs_offset</a> - <font size=-1>find the absolute position of a child subsurface inside its top level parent</font></li>
+<li><a href="surface.html#Surface.get_abs_parent">Surface.get_abs_parent</a> - <font size=-1>find the top level parent of a subsurface</font></li>
+<li><a href="surface.html#Surface.get_alpha">Surface.get_alpha</a> - <font size=-1>get the current Surface transparency value</font></li>
+<li><a href="surface.html#Surface.get_at">Surface.get_at</a> - <font size=-1>get the color value at a single pixel</font></li>
+<li><a href="surface.html#Surface.get_bitsize">Surface.get_bitsize</a> - <font size=-1>get the bit depth of the Surface pixel format</font></li>
+<li><a href="surface.html#Surface.get_bounding_rect">Surface.get_bounding_rect</a> - <font size=-1>find the smallest rect containing data</font></li>
+<li><a href="surface.html#Surface.get_buffer">Surface.get_buffer</a> - <font size=-1>acquires a buffer object for the pixels of the Surface.</font></li>
+<li><a href="surface.html#Surface.get_bytesize">Surface.get_bytesize</a> - <font size=-1>get the bytes used per Surface pixel</font></li>
+<li><a href="surface.html#Surface.get_clip">Surface.get_clip</a> - <font size=-1>get the current clipping area of the Surface</font></li>
+<li><a href="surface.html#Surface.get_colorkey">Surface.get_colorkey</a> - <font size=-1>Get the current transparent colorkey</font></li>
+<li><a href="surface.html#Surface.get_flags">Surface.get_flags</a> - <font size=-1>get the additional flags used for the Surface</font></li>
+<li><a href="surface.html#Surface.get_height">Surface.get_height</a> - <font size=-1>get the height of the Surface</font></li>
+<li><a href="surface.html#Surface.get_locked">Surface.get_locked</a> - <font size=-1>test if the Surface is current locked</font></li>
+<li><a href="surface.html#Surface.get_locks">Surface.get_locks</a> - <font size=-1>Gets the locks for the Surface</font></li>
+<li><a href="surface.html#Surface.get_losses">Surface.get_losses</a> - <font size=-1>the significant bits used to convert between a color and a mapped integer</font></li>
+<li><a href="surface.html#Surface.get_masks">Surface.get_masks</a> - <font size=-1>the bitmasks needed to convert between a color and a mapped integer</font></li>
+<li><a href="surface.html#Surface.get_offset">Surface.get_offset</a> - <font size=-1>find the position of a child subsurface inside a parent</font></li>
+<li><a href="surface.html#Surface.get_palette">Surface.get_palette</a> - <font size=-1>get the color index palette for an 8bit Surface</font></li>
+<li><a href="surface.html#Surface.get_palette_at">Surface.get_palette_at</a> - <font size=-1>get the color for a single entry in a palette</font></li>
+<li><a href="surface.html#Surface.get_parent">Surface.get_parent</a> - <font size=-1>find the parent of a subsurface</font></li>
+<li><a href="surface.html#Surface.get_pitch">Surface.get_pitch</a> - <font size=-1>get the number of bytes used per Surface row</font></li>
+<li><a href="surface.html#Surface.get_rect">Surface.get_rect</a> - <font size=-1>get the rectangular area of the Surface</font></li>
+<li><a href="surface.html#Surface.get_shifts">Surface.get_shifts</a> - <font size=-1>the bit shifts needed to convert between a color and a mapped integer</font></li>
+<li><a href="surface.html#Surface.get_size">Surface.get_size</a> - <font size=-1>get the dimensions of the Surface</font></li>
+<li><a href="surface.html#Surface.get_width">Surface.get_width</a> - <font size=-1>get the width of the Surface</font></li>
+<li><a href="surface.html#Surface.lock">Surface.lock</a> - <font size=-1>lock the Surface memory for pixel access</font></li>
+<li><a href="surface.html#Surface.map_rgb">Surface.map_rgb</a> - <font size=-1>convert a color into a mapped color value</font></li>
+<li><a href="surface.html#Surface.mustlock">Surface.mustlock</a> - <font size=-1>test if the Surface requires locking</font></li>
+<li><a href="surface.html#Surface.scroll">Surface.scroll</a> - <font size=-1>Shift the surface image in place</font></li>
+<li><a href="surface.html#Surface.set_alpha">Surface.set_alpha</a> - <font size=-1>set the alpha value for the full Surface image</font></li>
+<li><a href="surface.html#Surface.set_at">Surface.set_at</a> - <font size=-1>set the color value for a single pixel</font></li>
+<li><a href="surface.html#Surface.set_clip">Surface.set_clip</a> - <font size=-1>set the current clipping area of the Surface</font></li>
+<li><a href="surface.html#Surface.set_colorkey">Surface.set_colorkey</a> - <font size=-1>Set the transparent colorkey</font></li>
+<li><a href="surface.html#Surface.set_masks">Surface.set_masks</a> - <font size=-1>set the bitmasks needed to convert between a color and a mapped integer</font></li>
+<li><a href="surface.html#Surface.set_palette">Surface.set_palette</a> - <font size=-1>set the color palette for an 8bit Surface</font></li>
+<li><a href="surface.html#Surface.set_palette_at">Surface.set_palette_at</a> - <font size=-1>set the color for a single index in an 8bit Surface palette</font></li>
+<li><a href="surface.html#Surface.set_shifts">Surface.set_shifts</a> - <font size=-1>sets the bit shifts needed to convert between a color and a mapped integer</font></li>
+<li><a href="surface.html#Surface.subsurface">Surface.subsurface</a> - <font size=-1>create a new surface that references its parent</font></li>
+<li><a href="surface.html#Surface.unlock">Surface.unlock</a> - <font size=-1>unlock the Surface memory from pixel access</font></li>
+<li><a href="surface.html#Surface.unmap_rgb">Surface.unmap_rgb</a> - <font size=-1>convert a mapped integer color value into a Color</font></li>
+</ul>
 <li><a href="camera.html#pygame.camera">pygame.camera</a> - <font size=-1>pygame module for camera use</font></li>
 <ul>
 <li><a href="camera.html#pygame.camera.Camera">pygame.camera.Camera</a> - <font size=-1>load a camera</font></li>
 <li><a href="cdrom.html#pygame.cdrom.init">pygame.cdrom.init</a> - <font size=-1>initialize the cdrom module</font></li>
 <li><a href="cdrom.html#pygame.cdrom.quit">pygame.cdrom.quit</a> - <font size=-1>uninitialize the cdrom module</font></li>
 </ul>
-<li><a href="color.html#pygame.Color">pygame.Color</a> - <font size=-1>pygame object for color representations</font></li>
-<ul>
-<li><a href="color.html#Color.a">Color.a</a> - <font size=-1>Gets or sets the alpha value of the Color.</font></li>
-<li><a href="color.html#Color.b">Color.b</a> - <font size=-1>Gets or sets the blue value of the Color.</font></li>
-<li><a href="color.html#Color.cmy">Color.cmy</a> - <font size=-1>Gets or sets the CMY representation of the Color.</font></li>
-<li><a href="color.html#Color.correct_gamma">Color.correct_gamma</a> - <font size=-1>Applies a certain gamma value to the Color.</font></li>
-<li><a href="color.html#Color.g">Color.g</a> - <font size=-1>Gets or sets the green value of the Color.</font></li>
-<li><a href="color.html#Color.hsla">Color.hsla</a> - <font size=-1>Gets or sets the HSLA representation of the Color.</font></li>
-<li><a href="color.html#Color.hsva">Color.hsva</a> - <font size=-1>Gets or sets the HSVA representation of the Color.</font></li>
-<li><a href="color.html#Color.i1i2i3">Color.i1i2i3</a> - <font size=-1>Gets or sets the I1I2I3 representation of the Color.</font></li>
-<li><a href="color.html#Color.normalize">Color.normalize</a> - <font size=-1>Returns the normalized RGBA values of the Color.</font></li>
-<li><a href="color.html#Color.r">Color.r</a> - <font size=-1>Gets or sets the red value of the Color.</font></li>
-</ul>
 <li><a href="locals.html#pygame.contants">pygame.contants</a> - <font size=-1>Pygame constants</font></li>
 <ul>
 <li><a href="locals.html#display">display</a> - <font size=-1>The following constants are used by the display module and Surfaces</font></li>
 </ul>
 <li><a href="display.html#pygame.display">pygame.display</a> - <font size=-1>pygame module to control the display window and screen</font></li>
 <ul>
+<li><a href="display.html#pygame.display.Info">pygame.display.Info</a> - <font size=-1>Create a video display information object</font></li>
 <li><a href="display.html#pygame.display.flip">pygame.display.flip</a> - <font size=-1>update the full display Surface to the screen</font></li>
 <li><a href="display.html#pygame.display.get_active">pygame.display.get_active</a> - <font size=-1>true when the display is active on the display</font></li>
 <li><a href="display.html#pygame.display.get_caption">pygame.display.get_caption</a> - <font size=-1>get the current window caption</font></li>
 <li><a href="display.html#pygame.display.gl_get_attribute">pygame.display.gl_get_attribute</a> - <font size=-1>get the value for an opengl flag for the current display</font></li>
 <li><a href="display.html#pygame.display.gl_set_attribute">pygame.display.gl_set_attribute</a> - <font size=-1>request an opengl display attribute for the display mode</font></li>
 <li><a href="display.html#pygame.display.iconify">pygame.display.iconify</a> - <font size=-1>iconify the display surface</font></li>
-<li><a href="display.html#pygame.display.Info">pygame.display.Info</a> - <font size=-1>Create a video display information object</font></li>
 <li><a href="display.html#pygame.display.init">pygame.display.init</a> - <font size=-1>initialize the display module</font></li>
 <li><a href="display.html#pygame.display.list_modes">pygame.display.list_modes</a> - <font size=-1>get list of available fullscreen modes</font></li>
 <li><a href="display.html#pygame.display.mode_ok">pygame.display.mode_ok</a> - <font size=-1>pick the best color depth for a display mode</font></li>
 <li><a href="draw.html#pygame.draw.polygon">pygame.draw.polygon</a> - <font size=-1>draw a shape with any number of sides</font></li>
 <li><a href="draw.html#pygame.draw.rect">pygame.draw.rect</a> - <font size=-1>draw a rectangle shape</font></li>
 </ul>
+<li><a href="pygame.html#pygame.error">pygame.error</a> - <font size=-1>standard pygame exception</font></li>