Nirav Patel avatar Nirav Patel committed 5320c33

Mask convolve function and tests from Michael George

Comments (0)

Files changed (12)

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="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="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="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>
-<!--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="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="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="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>
+<!--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="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="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="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, 3 or 4 element integer sequences, <tt>HTML</tt> color format strings, '0xrrggbbaa' strings, and integer pixel values. </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="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="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="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, 3 or 4 element integer sequences, <tt>HTML</tt> color format strings, '0xrrggbbaa' strings, and integer pixel values. </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/index.html

 <li><a href="mask.html#Mask.clear">Mask.clear</a> - <font size=-1>Sets all bits to 0</font></li>
 <li><a href="mask.html#Mask.connected_component">Mask.connected_component</a> - <font size=-1>Returns a mask of a connected region of pixels.</font></li>
 <li><a href="mask.html#Mask.connected_components">Mask.connected_components</a> - <font size=-1>Returns a list of masks of connected regions of pixels.</font></li>
+<li><a href="mask.html#Mask.convolve">Mask.convolve</a> - <font size=-1>Return the convolution of self with another mask.</font></li>
 <li><a href="mask.html#Mask.count">Mask.count</a> - <font size=-1>Returns the number of set pixels</font></li>
 <li><a href="mask.html#Mask.draw">Mask.draw</a> - <font size=-1>Draws a mask onto another</font></li>
 <li><a href="mask.html#Mask.erase">Mask.erase</a> - <font size=-1>Erases a mask from another</font></li>

docs/ref/locals.html

-
-<html>
-<title>locals - 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="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="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="time.html">Time</a>&nbsp;||&nbsp;
-<a href="transform.html">Transform</a>
-</td></tr></table>
-<br>
-
-
-<a name="pygame.contants">
-<big><b>pygame.contants</big></b><br><ul>
-  <i>Pygame constants</i><br>
-<ul><small><table>
-  <tr><td><a href="locals.html#display">display</a> - <font size=-1>The following constants are used by the display module and Surfaces</font></td><td>The following constants are used by the display module and Surfaces</td></tr>
-  <tr><td><a href="locals.html#events">events</a> - <font size=-1>These constants define the various event types</font></td><td>These constants define the various event types</td></tr>
-  <tr><td><a href="locals.html#keyboard">keyboard</a> - <font size=-1>These constants represent the keys on the keyboard.</font></td><td>These constants represent the keys on the keyboard.</td></tr>
-  <tr><td><a href="locals.html#modifiers">modifiers</a> - <font size=-1>These constants represent the modifier keys on the keyboard.</font></td><td>These constants represent the modifier keys on the keyboard.</td></tr>
-  <tr><td><a href="locals.html#time">time</a> - <font size=-1>These constants define the various time constants</font></td><td>These constants define the various time constants</td></tr>
-</table></small></ul>
-<p>These constants are defined by <tt>SDL</tt>, and needed in pygame. Note that many of the flags for <tt>SDL</tt> are not needed in pygame, and are not included here. These constants are generally accessed from the <tt>pygame.locals</tt> module. This module is automatically placed in the pygame namespace, but you will usually want to place them directly into your module's namespace with the following command, 'from <tt>pygame.locals</tt> import *'. </p>
-<!--COMMENTS:pygame.contants--> &nbsp;<br> 
-
-
-<a name="display">
-<big><b>display</big></b><br><ul>
-  <i>The following constants are used by the display module and Surfaces</i><br>
-<pre>    HWSURFACE - surface in hardware video memory. (equal to 1)
-    RESIZABLE - display window is resizeable
-    ASYNCBLIT - surface blits happen asynchronously (threaded)
-    OPENGL - display surface will be controlled by opengl
-    HWPALETTE - display surface has animatable hardware palette entries
-    DOUBLEBUF - hardware display surface is page flippable
-    FULLSCREEN - display surface is fullscreen (nonwindowed)
-    RLEACCEL - compile for quick alpha blits, only set in alpha or colorkey funcs
-    NOFRAME - no window decorations
-</pre>
-<!--COMMENTS:display--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="events">
-<big><b>events</big></b><br><ul>
-  <i>These constants define the various event types</i><br>
-<pre>    NOEVENT - no event, represents an empty event list, equal to 0
-    ACTIVEEVENT - window has gain/lost mouse/keyboard/visiblity focus
-    KEYDOWN - keyboard button has been pressed (or down and repeating)
-    KEYUP - keyboard button has been released
-    MOUSEMOTION - mouse has moved
-    MOUSEBUTTONDOWN - mouse button has been pressed
-    MOUSEBUTTONUP - mouse button has been released
-    JOYAXISMOTION - an opened joystick axis has changed
-    JOYBALLMOTION - an opened joystick ball has moved
-    JOYHATMOTION - an opened joystick hat has moved
-    JOYBUTTONDOWN - an opened joystick button has been pressed
-    JOYBUTTONUP - an opened joystick button has been released
-    VIDEORESIZE - the display window has been resized by the user
-    QUIT - the user has requested the game to quit
-    SYSWMEVENT - currently unsupported, system dependant
-    USEREVENT - all user messages are this or higher
-    NUMEVENTS - all user messages must be lower than this, equal to 32
-</pre>
-<!--COMMENTS:events--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="keyboard">
-<big><b>keyboard</big></b><br><ul>
-  <i>These constants represent the keys on the keyboard.</i><br>
-<p>There are many keyboard constants, they are used to represent keys on the keyboard. The following is a list of all keyboard constants </p>
-<pre>    <b>KeyASCII</b>       <b>ASCII</b> <b>Common Name</b>
-    K_BACKSPACE    \b    <i>backspace</i>
-    K_TAB          \t    <i>tab</i>
-    K_CLEAR              <i>clear</i>
-    K_RETURN       \r    <i>return</i>
-    K_PAUSE              <i>pause</i>
-    K_ESCAPE       ^[    <i>escape</i>
-    K_SPACE              <i>space</i>
-    K_EXCLAIM      !     <i>exclaim</i>
-    K_QUOTEDBL     &quot;     <i>quotedbl</i>
-    K_HASH         #     <i>hash</i>
-    K_DOLLAR       $     <i>dollar</i>
-    K_AMPERSAND    &amp;     <i>ampersand</i>
-    K_QUOTE        '     <i>quote</i>
-    K_LEFTPAREN    (     <i>left parenthesis</i>
-    K_RIGHTPAREN   )     <i>right parenthesis</i>
-    K_ASTERISK     *     <i>asterisk</i>
-    K_PLUS         +     <i>plus sign</i>
-    K_COMMA        ,     <i>comma</i>
-    K_MINUS        -     <i>minus sign</i>
-    K_PERIOD       .     <i>period</i>
-    K_SLASH        /     <i>forward slash</i>
-    K_0            0     <i>0</i>
-    K_1            1     <i>1</i>
-    K_2            2     <i>2</i>
-    K_3            3     <i>3</i>
-    K_4            4     <i>4</i>
-    K_5            5     <i>5</i>
-    K_6            6     <i>6</i>
-    K_7            7     <i>7</i>
-    K_8            8     <i>8</i>
-    K_9            9     <i>9</i>
-    K_COLON        :     <i>colon</i>
-    K_SEMICOLON    ;     <i>semicolon</i>
-    K_LESS         &lt;     <i>less-than sign</i>
-    K_EQUALS       =     <i>equals sign</i>
-    K_GREATER      &gt;     <i>greater-than sign</i>
-    K_QUESTION     ?     <i>question mark</i>
-    K_AT           @     <i>at</i>
-    K_LEFTBRACKET  [     <i>left bracket</i>
-    K_BACKSLASH    \     <i>backslash</i>
-    K_RIGHTBRACKET ]     <i>right bracket</i>
-    K_CARET        ^     <i>caret</i>
-    K_UNDERSCORE   _     <i>underscore</i>
-    K_BACKQUOTE    `     <i>grave</i>
-    K_a            a     <i>a</i>
-    K_b            b     <i>b</i>
-    K_c            c     <i>c</i>
-    K_d            d     <i>d</i>
-    K_e            e     <i>e</i>
-    K_f            f     <i>f</i>
-    K_g            g     <i>g</i>
-    K_h            h     <i>h</i>
-    K_i            i     <i>i</i>
-    K_j            j     <i>j</i>
-    K_k            k     <i>k</i>
-    K_l            l     <i>l</i>
-    K_m            m     <i>m</i>
-    K_n            n     <i>n</i>
-    K_o            o     <i>o</i>
-    K_p            p     <i>p</i>
-    K_q            q     <i>q</i>
-    K_r            r     <i>r</i>
-    K_s            s     <i>s</i>
-    K_t            t     <i>t</i>
-    K_u            u     <i>u</i>
-    K_v            v     <i>v</i>
-    K_w            w     <i>w</i>
-    K_x            x     <i>x</i>
-    K_y            y     <i>y</i>
-    K_z            z     <i>z</i>
-    K_DELETE             <i>delete</i>
-    K_KP0                <i>keypad 0</i>
-    K_KP1                <i>keypad 1</i>
-    K_KP2                <i>keypad 2</i>
-    K_KP3                <i>keypad 3</i>
-    K_KP4                <i>keypad 4</i>
-    K_KP5                <i>keypad 5</i>
-    K_KP6                <i>keypad 6</i>
-    K_KP7                <i>keypad 7</i>
-    K_KP8                <i>keypad 8</i>
-    K_KP9                <i>keypad 9</i>
-    K_KP_PERIOD    .     <i>keypad period</i>
-    K_KP_DIVIDE    /     <i>keypad divide</i>
-    K_KP_MULTIPLY  *     <i>keypad multiply</i>
-    K_KP_MINUS     -     <i>keypad minus</i>
-    K_KP_PLUS      +     <i>keypad plus</i>
-    K_KP_ENTER     \r    <i>keypad enter</i>
-    K_KP_EQUALS    =     <i>keypad equals</i>
-    K_UP                 <i>up arrow</i>
-    K_DOWN               <i>down arrow</i>
-    K_RIGHT              <i>right arrow</i>
-    K_LEFT               <i>left arrow</i>
-    K_INSERT             <i>insert</i>
-    K_HOME               <i>home</i>
-    K_END                <i>end</i>
-    K_PAGEUP             <i>page up</i>
-    K_PAGEDOWN           <i>page down</i>
-    K_F1                 <i>F1</i>
-    K_F2                 <i>F2</i>
-    K_F3                 <i>F3</i>
-    K_F4                 <i>F4</i>
-    K_F5                 <i>F5</i>
-    K_F6                 <i>F6</i>
-    K_F7                 <i>F7</i>
-    K_F8                 <i>F8</i>
-    K_F9                 <i>F9</i>
-    K_F10                <i>F10</i>
-    K_F11                <i>F11</i>
-    K_F12                <i>F12</i>
-    K_F13                <i>F13</i>
-    K_F14                <i>F14</i>
-    K_F15                <i>F15</i>
-    K_NUMLOCK            <i>numlock</i>
-    K_CAPSLOCK           <i>capslock</i>
-    K_SCROLLOCK          <i>scrollock</i>
-    K_RSHIFT             <i>right shift</i>
-    K_LSHIFT             <i>left shift</i>
-    K_RCTRL              <i>right ctrl</i>
-    K_LCTRL              <i>left ctrl</i>
-    K_RALT               <i>right alt</i>
-    K_LALT               <i>left alt</i>
-    K_RMETA              <i>right meta</i>
-    K_LMETA              <i>left meta</i>
-    K_LSUPER             <i>left windows key</i>
-    K_RSUPER             <i>right windows key</i>
-    K_MODE               <i>mode shift</i>
-    K_HELP               <i>help</i>
-    K_PRINT              <i>print-screen</i>
-    K_SYSREQ             <i>SysRq</i>
-    K_BREAK              <i>break</i>
-    K_MENU               <i>menu</i>
-    K_POWER              <i>power</i>
-    K_EURO               <i>euro</i>
-</pre>
-<!--COMMENTS:keyboard--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="modifiers">
-<big><b>modifiers</big></b><br><ul>
-  <i>These constants represent the modifier keys on the keyboard.</i><br>
-<p>Their states are treated slightly differently than normal keyboard button states, and you can temporarily set their states. </p>
-<pre>    KMOD_NONE, KMOD_LSHIFT, KMOD_RSHIFT, KMOD_SHIFT, KMOD_CAPS,
-    KMOD_LCTRL, KMOD_RCTRL, KMOD_CTRL, KMOD_LALT, KMOD_RALT,
-    KMOD_ALT, KMOD_LMETA, KMOD_RMETA, KMOD_META, KMOD_NUM, KMOD_MODE
-</pre>
-<!--COMMENTS:modifiers--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="time">
-<big><b>time</big></b><br><ul>
-  <i>These constants define the various time constants</i><br>
-<pre>    TIMER_RESOLUTION - minimum timer resolution in milliseconds
-</pre>
-<!--COMMENTS:time--> &nbsp;<br> 
-<br></ul>
-<br></ul>
-
-</body></html>
+
+<html>
+<title>locals - 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="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="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="time.html">Time</a>&nbsp;||&nbsp;
+<a href="transform.html">Transform</a>
+</td></tr></table>
+<br>
+
+
+<a name="pygame.contants">
+<big><b>pygame.contants</big></b><br><ul>
+  <i>Pygame constants</i><br>
+<ul><small><table>
+  <tr><td><a href="locals.html#display">display</a> - <font size=-1>The following constants are used by the display module and Surfaces</font></td><td>The following constants are used by the display module and Surfaces</td></tr>
+  <tr><td><a href="locals.html#events">events</a> - <font size=-1>These constants define the various event types</font></td><td>These constants define the various event types</td></tr>
+  <tr><td><a href="locals.html#keyboard">keyboard</a> - <font size=-1>These constants represent the keys on the keyboard.</font></td><td>These constants represent the keys on the keyboard.</td></tr>
+  <tr><td><a href="locals.html#modifiers">modifiers</a> - <font size=-1>These constants represent the modifier keys on the keyboard.</font></td><td>These constants represent the modifier keys on the keyboard.</td></tr>
+  <tr><td><a href="locals.html#time">time</a> - <font size=-1>These constants define the various time constants</font></td><td>These constants define the various time constants</td></tr>
+</table></small></ul>
+<p>These constants are defined by <tt>SDL</tt>, and needed in pygame. Note that many of the flags for <tt>SDL</tt> are not needed in pygame, and are not included here. These constants are generally accessed from the <tt>pygame.locals</tt> module. This module is automatically placed in the pygame namespace, but you will usually want to place them directly into your module's namespace with the following command, 'from <tt>pygame.locals</tt> import *'. </p>
+<!--COMMENTS:pygame.contants--> &nbsp;<br> 
+
+
+<a name="display">
+<big><b>display</big></b><br><ul>
+  <i>The following constants are used by the display module and Surfaces</i><br>
+<pre>    HWSURFACE - surface in hardware video memory. (equal to 1)
+    RESIZABLE - display window is resizeable
+    ASYNCBLIT - surface blits happen asynchronously (threaded)
+    OPENGL - display surface will be controlled by opengl
+    HWPALETTE - display surface has animatable hardware palette entries
+    DOUBLEBUF - hardware display surface is page flippable
+    FULLSCREEN - display surface is fullscreen (nonwindowed)
+    RLEACCEL - compile for quick alpha blits, only set in alpha or colorkey funcs
+    NOFRAME - no window decorations
+</pre>
+<!--COMMENTS:display--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="events">
+<big><b>events</big></b><br><ul>
+  <i>These constants define the various event types</i><br>
+<pre>    NOEVENT - no event, represents an empty event list, equal to 0
+    ACTIVEEVENT - window has gain/lost mouse/keyboard/visiblity focus
+    KEYDOWN - keyboard button has been pressed (or down and repeating)
+    KEYUP - keyboard button has been released
+    MOUSEMOTION - mouse has moved
+    MOUSEBUTTONDOWN - mouse button has been pressed
+    MOUSEBUTTONUP - mouse button has been released
+    JOYAXISMOTION - an opened joystick axis has changed
+    JOYBALLMOTION - an opened joystick ball has moved
+    JOYHATMOTION - an opened joystick hat has moved
+    JOYBUTTONDOWN - an opened joystick button has been pressed
+    JOYBUTTONUP - an opened joystick button has been released
+    VIDEORESIZE - the display window has been resized by the user
+    QUIT - the user has requested the game to quit
+    SYSWMEVENT - currently unsupported, system dependant
+    USEREVENT - all user messages are this or higher
+    NUMEVENTS - all user messages must be lower than this, equal to 32
+</pre>
+<!--COMMENTS:events--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="keyboard">
+<big><b>keyboard</big></b><br><ul>
+  <i>These constants represent the keys on the keyboard.</i><br>
+<p>There are many keyboard constants, they are used to represent keys on the keyboard. The following is a list of all keyboard constants </p>
+<pre>    <b>KeyASCII</b>       <b>ASCII</b> <b>Common Name</b>
+    K_BACKSPACE    \b    <i>backspace</i>
+    K_TAB          \t    <i>tab</i>
+    K_CLEAR              <i>clear</i>
+    K_RETURN       \r    <i>return</i>
+    K_PAUSE              <i>pause</i>
+    K_ESCAPE       ^[    <i>escape</i>
+    K_SPACE              <i>space</i>
+    K_EXCLAIM      !     <i>exclaim</i>
+    K_QUOTEDBL     &quot;     <i>quotedbl</i>
+    K_HASH         #     <i>hash</i>
+    K_DOLLAR       $     <i>dollar</i>
+    K_AMPERSAND    &amp;     <i>ampersand</i>
+    K_QUOTE        '     <i>quote</i>
+    K_LEFTPAREN    (     <i>left parenthesis</i>
+    K_RIGHTPAREN   )     <i>right parenthesis</i>
+    K_ASTERISK     *     <i>asterisk</i>
+    K_PLUS         +     <i>plus sign</i>
+    K_COMMA        ,     <i>comma</i>
+    K_MINUS        -     <i>minus sign</i>
+    K_PERIOD       .     <i>period</i>
+    K_SLASH        /     <i>forward slash</i>
+    K_0            0     <i>0</i>
+    K_1            1     <i>1</i>
+    K_2            2     <i>2</i>
+    K_3            3     <i>3</i>
+    K_4            4     <i>4</i>
+    K_5            5     <i>5</i>
+    K_6            6     <i>6</i>
+    K_7            7     <i>7</i>
+    K_8            8     <i>8</i>
+    K_9            9     <i>9</i>
+    K_COLON        :     <i>colon</i>
+    K_SEMICOLON    ;     <i>semicolon</i>
+    K_LESS         &lt;     <i>less-than sign</i>
+    K_EQUALS       =     <i>equals sign</i>
+    K_GREATER      &gt;     <i>greater-than sign</i>
+    K_QUESTION     ?     <i>question mark</i>
+    K_AT           @     <i>at</i>
+    K_LEFTBRACKET  [     <i>left bracket</i>
+    K_BACKSLASH    \     <i>backslash</i>
+    K_RIGHTBRACKET ]     <i>right bracket</i>
+    K_CARET        ^     <i>caret</i>
+    K_UNDERSCORE   _     <i>underscore</i>
+    K_BACKQUOTE    `     <i>grave</i>
+    K_a            a     <i>a</i>
+    K_b            b     <i>b</i>
+    K_c            c     <i>c</i>
+    K_d            d     <i>d</i>
+    K_e            e     <i>e</i>
+    K_f            f     <i>f</i>
+    K_g            g     <i>g</i>
+    K_h            h     <i>h</i>
+    K_i            i     <i>i</i>
+    K_j            j     <i>j</i>
+    K_k            k     <i>k</i>
+    K_l            l     <i>l</i>
+    K_m            m     <i>m</i>
+    K_n            n     <i>n</i>
+    K_o            o     <i>o</i>
+    K_p            p     <i>p</i>
+    K_q            q     <i>q</i>
+    K_r            r     <i>r</i>
+    K_s            s     <i>s</i>
+    K_t            t     <i>t</i>
+    K_u            u     <i>u</i>
+    K_v            v     <i>v</i>
+    K_w            w     <i>w</i>
+    K_x            x     <i>x</i>
+    K_y            y     <i>y</i>
+    K_z            z     <i>z</i>
+    K_DELETE             <i>delete</i>
+    K_KP0                <i>keypad 0</i>
+    K_KP1                <i>keypad 1</i>
+    K_KP2                <i>keypad 2</i>
+    K_KP3                <i>keypad 3</i>
+    K_KP4                <i>keypad 4</i>
+    K_KP5                <i>keypad 5</i>
+    K_KP6                <i>keypad 6</i>
+    K_KP7                <i>keypad 7</i>
+    K_KP8                <i>keypad 8</i>
+    K_KP9                <i>keypad 9</i>
+    K_KP_PERIOD    .     <i>keypad period</i>
+    K_KP_DIVIDE    /     <i>keypad divide</i>
+    K_KP_MULTIPLY  *     <i>keypad multiply</i>
+    K_KP_MINUS     -     <i>keypad minus</i>
+    K_KP_PLUS      +     <i>keypad plus</i>
+    K_KP_ENTER     \r    <i>keypad enter</i>
+    K_KP_EQUALS    =     <i>keypad equals</i>
+    K_UP                 <i>up arrow</i>
+    K_DOWN               <i>down arrow</i>
+    K_RIGHT              <i>right arrow</i>
+    K_LEFT               <i>left arrow</i>
+    K_INSERT             <i>insert</i>
+    K_HOME               <i>home</i>
+    K_END                <i>end</i>
+    K_PAGEUP             <i>page up</i>
+    K_PAGEDOWN           <i>page down</i>
+    K_F1                 <i>F1</i>
+    K_F2                 <i>F2</i>
+    K_F3                 <i>F3</i>
+    K_F4                 <i>F4</i>
+    K_F5                 <i>F5</i>
+    K_F6                 <i>F6</i>
+    K_F7                 <i>F7</i>
+    K_F8                 <i>F8</i>
+    K_F9                 <i>F9</i>
+    K_F10                <i>F10</i>
+    K_F11                <i>F11</i>
+    K_F12                <i>F12</i>
+    K_F13                <i>F13</i>
+    K_F14                <i>F14</i>
+    K_F15                <i>F15</i>
+    K_NUMLOCK            <i>numlock</i>
+    K_CAPSLOCK           <i>capslock</i>
+    K_SCROLLOCK          <i>scrollock</i>
+    K_RSHIFT             <i>right shift</i>
+    K_LSHIFT             <i>left shift</i>
+    K_RCTRL              <i>right ctrl</i>
+    K_LCTRL              <i>left ctrl</i>
+    K_RALT               <i>right alt</i>
+    K_LALT               <i>left alt</i>
+    K_RMETA              <i>right meta</i>
+    K_LMETA              <i>left meta</i>
+    K_LSUPER             <i>left windows key</i>
+    K_RSUPER             <i>right windows key</i>
+    K_MODE               <i>mode shift</i>
+    K_HELP               <i>help</i>
+    K_PRINT              <i>print-screen</i>
+    K_SYSREQ             <i>SysRq</i>
+    K_BREAK              <i>break</i>
+    K_MENU               <i>menu</i>
+    K_POWER              <i>power</i>
+    K_EURO               <i>euro</i>
+</pre>
+<!--COMMENTS:keyboard--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="modifiers">
+<big><b>modifiers</big></b><br><ul>
+  <i>These constants represent the modifier keys on the keyboard.</i><br>
+<p>Their states are treated slightly differently than normal keyboard button states, and you can temporarily set their states. </p>
+<pre>    KMOD_NONE, KMOD_LSHIFT, KMOD_RSHIFT, KMOD_SHIFT, KMOD_CAPS,
+    KMOD_LCTRL, KMOD_RCTRL, KMOD_CTRL, KMOD_LALT, KMOD_RALT,
+    KMOD_ALT, KMOD_LMETA, KMOD_RMETA, KMOD_META, KMOD_NUM, KMOD_MODE
+</pre>
+<!--COMMENTS:modifiers--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="time">
+<big><b>time</big></b><br><ul>
+  <i>These constants define the various time constants</i><br>
+<pre>    TIMER_RESOLUTION - minimum timer resolution in milliseconds
+</pre>
+<!--COMMENTS:time--> &nbsp;<br> 
+<br></ul>
+<br></ul>
+
+</body></html>

docs/ref/mask.html

-
-<html>
-<title>mask - 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="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="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="time.html">Time</a>&nbsp;||&nbsp;
-<a href="transform.html">Transform</a>
-</td></tr></table>
-<br>
-
-
-<a name="pygame.mask">
-<big><b>pygame.mask</big></b><br><ul>
-  <i>pygame module for image masks.</i><br>
-<ul><small><table>
-  <tr><td><a href="mask.html#pygame.mask.from_surface">pygame.mask.from_surface</a> - <font size=-1>Returns a Mask from the given surface.</font></td><td>Returns a Mask from the given surface.</td></tr>
-  <tr><td><a href="mask.html#pygame.mask.from_threshold">pygame.mask.from_threshold</a> - <font size=-1>Creates a mask by thresholding Surfaces</font></td><td>Creates a mask by thresholding Surfaces</td></tr>
-  <tr><td><a href="mask.html#pygame.mask.Mask">pygame.mask.Mask</a> - <font size=-1>pygame object for representing 2d bitmasks</font></td><td>pygame object for representing 2d bitmasks</td></tr>
-</table></small></ul>
-<p>Useful for fast pixel perfect collision detection. <tt>A</tt> Mask uses 1bit per pixel to store which parts collide. </p>
-<p>New in pygame <tt>1.8</tt>. </p>
-<!--COMMENTS:pygame.mask--> &nbsp;<br> 
-
-
-<a name="pygame.mask.from_surface">
-<big><b>pygame.mask.from_surface</big></b><br><ul>
-  <i>Returns a Mask from the given surface.</i><br>
-  <tt>pygame.mask.from_surface(Surface, threshold = 127) -> Mask</tt><br>
-<p>Makes the transparent parts of the Surface not set, and the opaque parts set. </p>
-<p>The alpha of each pixel is checked to see if it is greater than the given threshold. </p>
-<p>If the Surface is color keyed, then threshold is not used. </p>
-<!--COMMENTS:pygame.mask.from_surface--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.mask.from_threshold">
-<big><b>pygame.mask.from_threshold</big></b><br><ul>
-  <i>Creates a mask by thresholding Surfaces</i><br>
-  <tt>pygame.mask.from_surface(Surface, color, threshold = (0,0,0,255), othersurface = None) -> Mask</tt><br>
-<p>This is a more featureful method of getting a Mask from a Surface. If supplied with only one Surface, all pixels within the threshold of the supplied color are set in the Mask. If given the optional othersurface, all pixels in Surface that are within the threshold of the corresponding pixel in othersurface are set in the Mask. </p>
-<!--COMMENTS:pygame.mask.from_threshold--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="pygame.mask.Mask">
-<big><b>pygame.mask.Mask</big></b><br><ul>
-  <i>pygame object for representing 2d bitmasks</i><br>
-  <tt>pygame.Mask((width, height)): return Mask</tt><br>
-<ul><small><table>
-  <tr><td><a href="mask.html#Mask.get_size">Mask.get_size</a> - <font size=-1>Returns the size of the mask.</font></td><td>Returns the size of the mask.</td></tr>
-  <tr><td><a href="mask.html#Mask.get_at">Mask.get_at</a> - <font size=-1>Returns nonzero if the bit at (x,y) is set.</font></td><td>Returns nonzero if the bit at (x,y) is set.</td></tr>
-  <tr><td><a href="mask.html#Mask.set_at">Mask.set_at</a> - <font size=-1>Sets the position in the mask given by x and y.</font></td><td>Sets the position in the mask given by x and y.</td></tr>
-  <tr><td><a href="mask.html#Mask.overlap">Mask.overlap</a> - <font size=-1>Returns the point of intersection if the masks overlap with the given offset - or None if it does not overlap.</font></td><td>Returns the point of intersection if the masks overlap with the given offset - or None if it does not overlap.</td></tr>
-  <tr><td><a href="mask.html#Mask.overlap_area">Mask.overlap_area</a> - <font size=-1>Returns the number of overlapping 'pixels'.</font></td><td>Returns the number of overlapping 'pixels'.</td></tr>
-  <tr><td><a href="mask.html#Mask.overlap_mask">Mask.overlap_mask</a> - <font size=-1>Returns a mask of the overlapping pixels</font></td><td>Returns a mask of the overlapping pixels</td></tr>
-  <tr><td><a href="mask.html#Mask.fill">Mask.fill</a> - <font size=-1>Sets all bits to 1</font></td><td>Sets all bits to 1</td></tr>
-  <tr><td><a href="mask.html#Mask.clear">Mask.clear</a> - <font size=-1>Sets all bits to 0</font></td><td>Sets all bits to 0</td></tr>
-  <tr><td><a href="mask.html#Mask.invert">Mask.invert</a> - <font size=-1>Flips the bits in a Mask</font></td><td>Flips the bits in a Mask</td></tr>
-  <tr><td><a href="mask.html#Mask.scale">Mask.scale</a> - <font size=-1>Resizes a mask</font></td><td>Resizes a mask</td></tr>
-  <tr><td><a href="mask.html#Mask.draw">Mask.draw</a> - <font size=-1>Draws a mask onto another</font></td><td>Draws a mask onto another</td></tr>
-  <tr><td><a href="mask.html#Mask.erase">Mask.erase</a> - <font size=-1>Erases a mask from another</font></td><td>Erases a mask from another</td></tr>
-  <tr><td><a href="mask.html#Mask.count">Mask.count</a> - <font size=-1>Returns the number of set pixels</font></td><td>Returns the number of set pixels</td></tr>
-  <tr><td><a href="mask.html#Mask.centroid">Mask.centroid</a> - <font size=-1>Returns the centroid of the pixels in a Mask</font></td><td>Returns the centroid of the pixels in a Mask</td></tr>
-  <tr><td><a href="mask.html#Mask.angle">Mask.angle</a> - <font size=-1>Returns the orientation of the pixels</font></td><td>Returns the orientation of the pixels</td></tr>
-  <tr><td><a href="mask.html#Mask.outline">Mask.outline</a> - <font size=-1>list of points outlining an object</font></td><td>list of points outlining an object</td></tr>
-  <tr><td><a href="mask.html#Mask.connected_component">Mask.connected_component</a> - <font size=-1>Returns a mask of a connected region of pixels.</font></td><td>Returns a mask of a connected region of pixels.</td></tr>
-  <tr><td><a href="mask.html#Mask.connected_components">Mask.connected_components</a> - <font size=-1>Returns a list of masks of connected regions of pixels.</font></td><td>Returns a list of masks of connected regions of pixels.</td></tr>
-  <tr><td><a href="mask.html#Mask.get_bounding_rects">Mask.get_bounding_rects</a> - <font size=-1>Returns a list of bounding rects of regions of set pixels.</font></td><td>Returns a list of bounding rects of regions of set pixels.</td></tr>
-</table></small></ul>
- &nbsp;<br> 
-<!--COMMENTS:pygame.mask.Mask--> &nbsp;<br> 
-
-
-<a name="Mask.get_size">
-<big><b>Mask.get_size</big></b><br><ul>
-  <i>Returns the size of the mask.</i><br>
-  <tt>Mask.get_size() -> width,height</tt><br>
- &nbsp;<br> 
-<!--COMMENTS:Mask.get_size--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.get_at">
-<big><b>Mask.get_at</big></b><br><ul>
-  <i>Returns nonzero if the bit at (x,y) is set.</i><br>
-  <tt>Mask.get_at((x,y)) -> int</tt><br>
-<p>Coordinates start at (0,0) is top left - just like Surfaces. </p>
-<!--COMMENTS:Mask.get_at--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.set_at">
-<big><b>Mask.set_at</big></b><br><ul>
-  <i>Sets the position in the mask given by x and y.</i><br>
-  <tt>Mask.set_at((x,y),value)</tt><br>
- &nbsp;<br> 
-<!--COMMENTS:Mask.set_at--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.overlap">
-<big><b>Mask.overlap</big></b><br><ul>
-  <i>Returns the point of intersection if the masks overlap with the given offset - or None if it does not overlap.</i><br>
-  <tt>Mask.overlap(othermask, offset) -> x,y</tt><br>
-<p>The overlap tests uses the following offsets (which may be negative): </p>
-<pre>   +----+----------..
-   |A   | yoffset
-   |  +-+----------..
-   +--|B
-   |xoffset
-   |  |
-   :  :
-</pre>
-<!--COMMENTS:Mask.overlap--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.overlap_area">
-<big><b>Mask.overlap_area</big></b><br><ul>
-  <i>Returns the number of overlapping 'pixels'.</i><br>
-  <tt>Mask.overlap_area(othermask, offset) -> numpixels</tt><br>
-<p>You can see how many pixels overlap with the other mask given. This can be used to see in which direction things collide, or to see how much the two masks collide. An approximate collision normal can be found by calculating the gradient of the overlap area through the finite difference. </p>
-<pre> dx = Mask.overlap_area(othermask,(x+1,y)) - Mask.overlap_area(othermask,(x-1,y))
- dy = Mask.overlap_area(othermask,(x,y+1)) - Mask.overlap_area(othermask,(x,y-1))
-</pre>
-<!--COMMENTS:Mask.overlap_area--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.overlap_mask">
-<big><b>Mask.overlap_mask</big></b><br><ul>
-  <i>Returns a mask of the overlapping pixels</i><br>
-  <tt>Mask.overlap_mask(othermask, offset) -> Mask</tt><br>
-<p>Returns a Mask the size of the original Mask containing only the overlapping pixels between Mask and othermask. </p>
-<!--COMMENTS:Mask.overlap_mask--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.fill">
-<big><b>Mask.fill</big></b><br><ul>
-  <i>Sets all bits to 1</i><br>
-  <tt>Mask.fill()</tt><br>
-<p>Sets all bits in a Mask to 1. </p>
-<!--COMMENTS:Mask.fill--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.clear">
-<big><b>Mask.clear</big></b><br><ul>
-  <i>Sets all bits to 0</i><br>
-  <tt>Mask.clear()</tt><br>
-<p>Sets all bits in a Mask to 0. </p>
-<!--COMMENTS:Mask.clear--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.invert">
-<big><b>Mask.invert</big></b><br><ul>
-  <i>Flips the bits in a Mask</i><br>
-  <tt>Mask.invert()</tt><br>
-<p>Flips all of the bits in a Mask, so that the set pixels turn to unset pixels and the unset pixels turn to set pixels. </p>
-<!--COMMENTS:Mask.invert--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.scale">
-<big><b>Mask.scale</big></b><br><ul>
-  <i>Resizes a mask</i><br>
-  <tt>Mask.scale((x, y)) -> Mask</tt><br>
-<p>Returns a new Mask of the Mask scaled to the requested size. </p>
-<!--COMMENTS:Mask.scale--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.draw">
-<big><b>Mask.draw</big></b><br><ul>
-  <i>Draws a mask onto another</i><br>
-  <tt>Mask.draw(othermask, offset)</tt><br>
-<p>Performs a bitwise <tt>OR</tt>, drawing othermask onto Mask. </p>
-<!--COMMENTS:Mask.draw--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.erase">
-<big><b>Mask.erase</big></b><br><ul>
-  <i>Erases a mask from another</i><br>
-  <tt>Mask.erase(othermask, offset)</tt><br>
-<p>Erases all pixels set in othermask from Mask. </p>
-<!--COMMENTS:Mask.erase--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.count">
-<big><b>Mask.count</big></b><br><ul>
-  <i>Returns the number of set pixels</i><br>
-  <tt>Mask.count() -> pixels</tt><br>
-<p>Returns the number of set pixels in the Mask. </p>
-<!--COMMENTS:Mask.count--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.centroid">
-<big><b>Mask.centroid</big></b><br><ul>
-  <i>Returns the centroid of the pixels in a Mask</i><br>
-  <tt>Mask.centroid() -> (x, y)</tt><br>
-<p>Finds the centroid, the center of pixel mass, of a Mask. Returns a coordinate tuple for the centroid of the Mask. In the event the Mask is empty, it will return (0,0). </p>
-<!--COMMENTS:Mask.centroid--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.angle">
-<big><b>Mask.angle</big></b><br><ul>
-  <i>Returns the orientation of the pixels</i><br>
-  <tt>Mask.angle() -> theta</tt><br>
-<p>Finds the approximate orientation of the pixels in the image from -90 to 90 degrees. This works best if performed on one connected component of pixels. It will return <tt>0.0</tt> on an empty Mask. </p>
-<!--COMMENTS:Mask.angle--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.outline">
-<big><b>Mask.outline</big></b><br><ul>
-  <i>list of points outlining an object</i><br>
-  <tt>Mask.outline(every = 1) -> [(x,y), (x,y) ...]</tt><br>
-<p>Returns a list of points of the outline of the first object it comes across in a Mask. For this to be useful, there should probably only be one connected component of pixels in the Mask. The every option allows you to skip pixels in the outline. For example, setting it to 10 would return a list of every 10th pixel in the outline. </p>
-<!--COMMENTS:Mask.outline--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.connected_component">
-<big><b>Mask.connected_component</big></b><br><ul>
-  <i>Returns a mask of a connected region of pixels.</i><br>
-  <tt>Mask.connected_component((x,y) = None) -> Mask</tt><br>
-<p>This uses the <tt>SAUF</tt> algorithm to find a connected component in the Mask. It checks 8 point connectivity. By default, it will return the largest connected component in the image. Optionally, a coordinate pair of a pixel can be specified, and the connected component containing it will be returned. In the event the pixel at that location is not set, the returned Mask will be empty. The Mask returned is the same size as the original Mask. </p>
-<!--COMMENTS:Mask.connected_component--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.connected_components">
-<big><b>Mask.connected_components</big></b><br><ul>
-  <i>Returns a list of masks of connected regions of pixels.</i><br>
-  <tt>Mask.connected_components(min = 0) -> [Masks]</tt><br>
-<p>Returns a list of masks of connected regions of pixels. An optional minimum number of pixels per connected region can be specified to filter out noise. </p>
-<!--COMMENTS:Mask.connected_components--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="Mask.get_bounding_rects">
-<big><b>Mask.get_bounding_rects</big></b><br><ul>
-  <i>Returns a list of bounding rects of regions of set pixels.</i><br>
-  <tt>Mask.get_bounding_rects() -> Rects</tt><br>
-<p>This gets a bounding rect of connected regions of set pixels. <tt>A</tt> bounding rect is one for which each of the connected pixels is inside the rect. </p>
-<!--COMMENTS:Mask.get_bounding_rects--> &nbsp;<br> 
-<br></ul>
-<br></ul>
-<br></ul>
-
-</body></html>
+
+<html>
+<title>mask - 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="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="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="time.html">Time</a>&nbsp;||&nbsp;
+<a href="transform.html">Transform</a>
+</td></tr></table>
+<br>
+
+
+<a name="pygame.mask">
+<big><b>pygame.mask</big></b><br><ul>
+  <i>pygame module for image masks.</i><br>
+<ul><small><table>
+  <tr><td><a href="mask.html#pygame.mask.from_surface">pygame.mask.from_surface</a> - <font size=-1>Returns a Mask from the given surface.</font></td><td>Returns a Mask from the given surface.</td></tr>
+  <tr><td><a href="mask.html#pygame.mask.from_threshold">pygame.mask.from_threshold</a> - <font size=-1>Creates a mask by thresholding Surfaces</font></td><td>Creates a mask by thresholding Surfaces</td></tr>
+  <tr><td><a href="mask.html#pygame.mask.Mask">pygame.mask.Mask</a> - <font size=-1>pygame object for representing 2d bitmasks</font></td><td>pygame object for representing 2d bitmasks</td></tr>
+</table></small></ul>
+<p>Useful for fast pixel perfect collision detection. <tt>A</tt> Mask uses 1bit per pixel to store which parts collide. </p>
+<p>New in pygame <tt>1.8</tt>. </p>
+<!--COMMENTS:pygame.mask--> &nbsp;<br> 
+
+
+<a name="pygame.mask.from_surface">
+<big><b>pygame.mask.from_surface</big></b><br><ul>
+  <i>Returns a Mask from the given surface.</i><br>
+  <tt>pygame.mask.from_surface(Surface, threshold = 127) -> Mask</tt><br>
+<p>Makes the transparent parts of the Surface not set, and the opaque parts set. </p>
+<p>The alpha of each pixel is checked to see if it is greater than the given threshold. </p>
+<p>If the Surface is color keyed, then threshold is not used. </p>
+<!--COMMENTS:pygame.mask.from_surface--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.mask.from_threshold">
+<big><b>pygame.mask.from_threshold</big></b><br><ul>
+  <i>Creates a mask by thresholding Surfaces</i><br>
+  <tt>pygame.mask.from_surface(Surface, color, threshold = (0,0,0,255), othersurface = None) -> Mask</tt><br>
+<p>This is a more featureful method of getting a Mask from a Surface. If supplied with only one Surface, all pixels within the threshold of the supplied color are set in the Mask. If given the optional othersurface, all pixels in Surface that are within the threshold of the corresponding pixel in othersurface are set in the Mask. </p>
+<!--COMMENTS:pygame.mask.from_threshold--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.mask.Mask">
+<big><b>pygame.mask.Mask</big></b><br><ul>
+  <i>pygame object for representing 2d bitmasks</i><br>
+  <tt>pygame.Mask((width, height)): return Mask</tt><br>
+<ul><small><table>
+  <tr><td><a href="mask.html#Mask.get_size">Mask.get_size</a> - <font size=-1>Returns the size of the mask.</font></td><td>Returns the size of the mask.</td></tr>
+  <tr><td><a href="mask.html#Mask.get_at">Mask.get_at</a> - <font size=-1>Returns nonzero if the bit at (x,y) is set.</font></td><td>Returns nonzero if the bit at (x,y) is set.</td></tr>
+  <tr><td><a href="mask.html#Mask.set_at">Mask.set_at</a> - <font size=-1>Sets the position in the mask given by x and y.</font></td><td>Sets the position in the mask given by x and y.</td></tr>
+  <tr><td><a href="mask.html#Mask.overlap">Mask.overlap</a> - <font size=-1>Returns the point of intersection if the masks overlap with the given offset - or None if it does not overlap.</font></td><td>Returns the point of intersection if the masks overlap with the given offset - or None if it does not overlap.</td></tr>
+  <tr><td><a href="mask.html#Mask.overlap_area">Mask.overlap_area</a> - <font size=-1>Returns the number of overlapping 'pixels'.</font></td><td>Returns the number of overlapping 'pixels'.</td></tr>
+  <tr><td><a href="mask.html#Mask.overlap_mask">Mask.overlap_mask</a> - <font size=-1>Returns a mask of the overlapping pixels</font></td><td>Returns a mask of the overlapping pixels</td></tr>
+  <tr><td><a href="mask.html#Mask.fill">Mask.fill</a> - <font size=-1>Sets all bits to 1</font></td><td>Sets all bits to 1</td></tr>
+  <tr><td><a href="mask.html#Mask.clear">Mask.clear</a> - <font size=-1>Sets all bits to 0</font></td><td>Sets all bits to 0</td></tr>
+  <tr><td><a href="mask.html#Mask.invert">Mask.invert</a> - <font size=-1>Flips the bits in a Mask</font></td><td>Flips the bits in a Mask</td></tr>
+  <tr><td><a href="mask.html#Mask.scale">Mask.scale</a> - <font size=-1>Resizes a mask</font></td><td>Resizes a mask</td></tr>
+  <tr><td><a href="mask.html#Mask.draw">Mask.draw</a> - <font size=-1>Draws a mask onto another</font></td><td>Draws a mask onto another</td></tr>
+  <tr><td><a href="mask.html#Mask.erase">Mask.erase</a> - <font size=-1>Erases a mask from another</font></td><td>Erases a mask from another</td></tr>
+  <tr><td><a href="mask.html#Mask.count">Mask.count</a> - <font size=-1>Returns the number of set pixels</font></td><td>Returns the number of set pixels</td></tr>
+  <tr><td><a href="mask.html#Mask.centroid">Mask.centroid</a> - <font size=-1>Returns the centroid of the pixels in a Mask</font></td><td>Returns the centroid of the pixels in a Mask</td></tr>
+  <tr><td><a href="mask.html#Mask.angle">Mask.angle</a> - <font size=-1>Returns the orientation of the pixels</font></td><td>Returns the orientation of the pixels</td></tr>
+  <tr><td><a href="mask.html#Mask.outline">Mask.outline</a> - <font size=-1>list of points outlining an object</font></td><td>list of points outlining an object</td></tr>
+  <tr><td><a href="mask.html#Mask.convolve">Mask.convolve</a> - <font size=-1>Return the convolution of self with another mask.</font></td><td>Return the convolution of self with another mask.</td></tr>
+  <tr><td><a href="mask.html#Mask.connected_component">Mask.connected_component</a> - <font size=-1>Returns a mask of a connected region of pixels.</font></td><td>Returns a mask of a connected region of pixels.</td></tr>
+  <tr><td><a href="mask.html#Mask.connected_components">Mask.connected_components</a> - <font size=-1>Returns a list of masks of connected regions of pixels.</font></td><td>Returns a list of masks of connected regions of pixels.</td></tr>
+  <tr><td><a href="mask.html#Mask.get_bounding_rects">Mask.get_bounding_rects</a> - <font size=-1>Returns a list of bounding rects of regions of set pixels.</font></td><td>Returns a list of bounding rects of regions of set pixels.</td></tr>
+</table></small></ul>
+ &nbsp;<br> 
+<!--COMMENTS:pygame.mask.Mask--> &nbsp;<br> 
+
+
+<a name="Mask.get_size">
+<big><b>Mask.get_size</big></b><br><ul>
+  <i>Returns the size of the mask.</i><br>
+  <tt>Mask.get_size() -> width,height</tt><br>
+ &nbsp;<br> 
+<!--COMMENTS:Mask.get_size--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.get_at">
+<big><b>Mask.get_at</big></b><br><ul>
+  <i>Returns nonzero if the bit at (x,y) is set.</i><br>
+  <tt>Mask.get_at((x,y)) -> int</tt><br>
+<p>Coordinates start at (0,0) is top left - just like Surfaces. </p>
+<!--COMMENTS:Mask.get_at--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.set_at">
+<big><b>Mask.set_at</big></b><br><ul>
+  <i>Sets the position in the mask given by x and y.</i><br>
+  <tt>Mask.set_at((x,y),value)</tt><br>
+ &nbsp;<br> 
+<!--COMMENTS:Mask.set_at--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.overlap">
+<big><b>Mask.overlap</big></b><br><ul>
+  <i>Returns the point of intersection if the masks overlap with the given offset - or None if it does not overlap.</i><br>
+  <tt>Mask.overlap(othermask, offset) -> x,y</tt><br>
+<p>The overlap tests uses the following offsets (which may be negative): </p>
+<pre>   +----+----------..
+   |A   | yoffset
+   |  +-+----------..
+   +--|B
+   |xoffset
+   |  |
+   :  :
+</pre>
+<!--COMMENTS:Mask.overlap--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.overlap_area">
+<big><b>Mask.overlap_area</big></b><br><ul>
+  <i>Returns the number of overlapping 'pixels'.</i><br>
+  <tt>Mask.overlap_area(othermask, offset) -> numpixels</tt><br>
+<p>You can see how many pixels overlap with the other mask given. This can be used to see in which direction things collide, or to see how much the two masks collide. An approximate collision normal can be found by calculating the gradient of the overlap area through the finite difference. </p>
+<pre> dx = Mask.overlap_area(othermask,(x+1,y)) - Mask.overlap_area(othermask,(x-1,y))
+ dy = Mask.overlap_area(othermask,(x,y+1)) - Mask.overlap_area(othermask,(x,y-1))
+</pre>
+<!--COMMENTS:Mask.overlap_area--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.overlap_mask">
+<big><b>Mask.overlap_mask</big></b><br><ul>
+  <i>Returns a mask of the overlapping pixels</i><br>
+  <tt>Mask.overlap_mask(othermask, offset) -> Mask</tt><br>
+<p>Returns a Mask the size of the original Mask containing only the overlapping pixels between Mask and othermask. </p>
+<!--COMMENTS:Mask.overlap_mask--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.fill">
+<big><b>Mask.fill</big></b><br><ul>
+  <i>Sets all bits to 1</i><br>
+  <tt>Mask.fill()</tt><br>
+<p>Sets all bits in a Mask to 1. </p>
+<!--COMMENTS:Mask.fill--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.clear">
+<big><b>Mask.clear</big></b><br><ul>
+  <i>Sets all bits to 0</i><br>
+  <tt>Mask.clear()</tt><br>
+<p>Sets all bits in a Mask to 0. </p>
+<!--COMMENTS:Mask.clear--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.invert">
+<big><b>Mask.invert</big></b><br><ul>
+  <i>Flips the bits in a Mask</i><br>
+  <tt>Mask.invert()</tt><br>
+<p>Flips all of the bits in a Mask, so that the set pixels turn to unset pixels and the unset pixels turn to set pixels. </p>
+<!--COMMENTS:Mask.invert--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.scale">
+<big><b>Mask.scale</big></b><br><ul>
+  <i>Resizes a mask</i><br>
+  <tt>Mask.scale((x, y)) -> Mask</tt><br>
+<p>Returns a new Mask of the Mask scaled to the requested size. </p>
+<!--COMMENTS:Mask.scale--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.draw">
+<big><b>Mask.draw</big></b><br><ul>
+  <i>Draws a mask onto another</i><br>
+  <tt>Mask.draw(othermask, offset)</tt><br>
+<p>Performs a bitwise <tt>OR</tt>, drawing othermask onto Mask. </p>
+<!--COMMENTS:Mask.draw--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.erase">
+<big><b>Mask.erase</big></b><br><ul>
+  <i>Erases a mask from another</i><br>
+  <tt>Mask.erase(othermask, offset)</tt><br>
+<p>Erases all pixels set in othermask from Mask. </p>
+<!--COMMENTS:Mask.erase--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.count">
+<big><b>Mask.count</big></b><br><ul>
+  <i>Returns the number of set pixels</i><br>
+  <tt>Mask.count() -> pixels</tt><br>
+<p>Returns the number of set pixels in the Mask. </p>
+<!--COMMENTS:Mask.count--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.centroid">
+<big><b>Mask.centroid</big></b><br><ul>
+  <i>Returns the centroid of the pixels in a Mask</i><br>
+  <tt>Mask.centroid() -> (x, y)</tt><br>
+<p>Finds the centroid, the center of pixel mass, of a Mask. Returns a coordinate tuple for the centroid of the Mask. In the event the Mask is empty, it will return (0,0). </p>
+<!--COMMENTS:Mask.centroid--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.angle">
+<big><b>Mask.angle</big></b><br><ul>
+  <i>Returns the orientation of the pixels</i><br>
+  <tt>Mask.angle() -> theta</tt><br>
+<p>Finds the approximate orientation of the pixels in the image from -90 to 90 degrees. This works best if performed on one connected component of pixels. It will return <tt>0.0</tt> on an empty Mask. </p>
+<!--COMMENTS:Mask.angle--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.outline">
+<big><b>Mask.outline</big></b><br><ul>
+  <i>list of points outlining an object</i><br>
+  <tt>Mask.outline(every = 1) -> [(x,y), (x,y) ...]</tt><br>
+<p>Returns a list of points of the outline of the first object it comes across in a Mask. For this to be useful, there should probably only be one connected component of pixels in the Mask. The every option allows you to skip pixels in the outline. For example, setting it to 10 would return a list of every 10th pixel in the outline. </p>
+<!--COMMENTS:Mask.outline--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.convolve">
+<big><b>Mask.convolve</big></b><br><ul>
+  <i>Return the convolution of self with another mask.</i><br>
+  <tt>Mask.convolve(othermask, outputmask = None, offset = (0,0)) -> Mask</tt><br>
+<p>Returns a mask with the (i-offset[0],j-offset[1]) bit set if shifting othermask so that it's lower right corner pixel is at (i,j) would cause it to overlap with self. </p>
+<p>If an outputmask is specified, the output is drawn onto outputmask and outputmask is returned. Otherwise a mask of size <tt>self.get_size()</tt> + <tt>othermask.get_size()</tt> - (1,1) is created. </p>
+<!--COMMENTS:Mask.convolve--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.connected_component">
+<big><b>Mask.connected_component</big></b><br><ul>
+  <i>Returns a mask of a connected region of pixels.</i><br>
+  <tt>Mask.connected_component((x,y) = None) -> Mask</tt><br>
+<p>This uses the <tt>SAUF</tt> algorithm to find a connected component in the Mask. It checks 8 point connectivity. By default, it will return the largest connected component in the image. Optionally, a coordinate pair of a pixel can be specified, and the connected component containing it will be returned. In the event the pixel at that location is not set, the returned Mask will be empty. The Mask returned is the same size as the original Mask. </p>
+<!--COMMENTS:Mask.connected_component--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.connected_components">
+<big><b>Mask.connected_components</big></b><br><ul>
+  <i>Returns a list of masks of connected regions of pixels.</i><br>
+  <tt>Mask.connected_components(min = 0) -> [Masks]</tt><br>
+<p>Returns a list of masks of connected regions of pixels. An optional minimum number of pixels per connected region can be specified to filter out noise. </p>
+<!--COMMENTS:Mask.connected_components--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Mask.get_bounding_rects">
+<big><b>Mask.get_bounding_rects</big></b><br><ul>
+  <i>Returns a list of bounding rects of regions of set pixels.</i><br>
+  <tt>Mask.get_bounding_rects() -> Rects</tt><br>
+<p>This gets a bounding rect of connected regions of set pixels. <tt>A</tt> bounding rect is one for which each of the connected pixels is inside the rect. </p>
+<!--COMMENTS:Mask.get_bounding_rects--> &nbsp;<br> 
+<br></ul>
+<br></ul>
+<br></ul>
+
+</body></html>

docs/ref/pixelarray.html

-
-<html>
-<title>pixelarray - 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="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="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="time.html">Time</a>&nbsp;||&nbsp;
-<a href="transform.html">Transform</a>
-</td></tr></table>
-<br>
-
-
-<a name="pygame.PixelArray">
-<big><b>pygame.PixelArray</big></b><br><ul>
-  <i>pygame object for direct pixel access of surfaces</i><br>
-  <tt>pygame.PixelArray(Surface): return PixelArray</tt><br>
-<ul><small><table>
-  <tr><td><a href="pixelarray.html#PixelArray.surface">PixelArray.surface</a> - <font size=-1>Gets the Surface the PixelArray uses.</font></td><td>Gets the Surface the PixelArray uses.</td></tr>
-  <tr><td><a href="pixelarray.html#PixelArray.make_surface">PixelArray.make_surface</a> - <font size=-1>Creates a new Surface from the current PixelArray.</font></td><td>Creates a new Surface from the current PixelArray.</td></tr>
-  <tr><td><a href="pixelarray.html#PixelArray.replace">PixelArray.replace</a> - <font size=-1>Replaces the passed color in the PixelArray with another one.</font></td><td>Replaces the passed color in the PixelArray with another one.</td></tr>
-  <tr><td><a href="pixelarray.html#PixelArray.extract">PixelArray.extract</a> - <font size=-1>Extracts the passed color from the PixelArray.</font></td><td>Extracts the passed color from the PixelArray.</td></tr>
-  <tr><td><a href="pixelarray.html#PixelArray.compare">PixelArray.compare</a> - <font size=-1>Compares the PixelArray with another one.</font></td><td>Compares the PixelArray with another one.</td></tr>
-</table></small></ul>
-<p>The PixelArray wraps up a Surface and provides a direct <tt>2D</tt> array access to its pixels using the surface its rows as first and its columns as second axis. It supports slicing, row and pixel manipluation, slicing and slice assignments while inplace operations such as addition, subtraction, multiplication, division and so forth are not allowed. </p>
-<p>While it is possible to assign both, integer color values and <tt>RGB(A)</tt> color tuples, the PixelArray will only use integers for the color representation. Thus, checking for certain colors has to be done using the <tt><a href="surface.html#Surface.map_rgb">Surface.map_rgb</a> - <font size=-1>convert a color into a mapped color value</font></tt> method of the surface, the PixelArray was created for. </p>
-<pre>  pxarray = pygame.PixelArray (surface)
-  # Check, if the first pixel at the topleft corner is blue
-  if pxarray[0][0] == surface.map_rgb ((0, 0, 255)):
-      ...
-</pre><p>Pixels can be manipulated using integer values or color tuples. </p>
-<pre>  pxarray[x][y] = 0xFF00FF
-  pxarray[x][y] = (255, 0, 255)
-</pre><p>If you operate on a slice, you also can use arbitrary sequences or other PixelArray objects to modify the pixels. They have to match the size of the PixelArray however. </p>
-<pre>  pxarray[a:b] = 0xFF00FF                   # set all pixels to 0xFF00FF
-  pxarray[a:b] = (0xFF00FF, 0xAACCEE, ... ) # first pixel = 0xFF00FF,
-                                            # second pixel  = 0xAACCEE, ...
-  pxarray[a:b] = ((255, 0, 255), (170, 204, 238), ...) # same as above
-  pxarray[a:b] = ((255, 0, 255), 0xAACCEE, ...)        # same as above
-  pxarray[a:b] = otherarray[x:y]            # slice sizes must match
-</pre><p>Note, that something like </p>
-<pre>  pxarray[2:4][3:5] = ...
-</pre><p>will not cause a rectangular manipulation. Instead it will be first sliced to a two-column array, which then shall be sliced by columns once more, which will fail due an IndexError. This is caused by the slicing mechanisms in python and an absolutely correct behaviour. Create a single columned slice first, which you can manipulate then: </p>
-<pre>  pxarray[2][3:5] = ...
-  pxarray[3][3:5] = ...
-</pre><p>If you want to make a rectangular manipulation or create a view of a part of the PixelArray, you also can use the subscript abilities. You can easily create different view by creating 'subarrays' using the subscripts. </p>
-<pre>  # Create some new PixelArray objects providing a different view
-  # of the original array/surface.
-  newarray = pxarray[2:4,3:5]
-  otherarray = pxarray[::2,::2]
-</pre><p>Subscripts also can be used to do fast rectangular pixel manipulations instead of iterating over the x or y axis as above. </p>
-<pre>  pxarray[::2,:] = (0, 0, 0)                # Make each second column black.
-</pre><p>During its lifetime, the PixelArray locks the surface, thus you explicitly have to delete it once its not used anymore and the surface should perform operations in the same scope. </p>
-<p>New in pygame <tt>1.8</tt>. Subscript support is new in pygame <tt>1.8.1</tt>. </p>
-<!--COMMENTS:pygame.PixelArray--> &nbsp;<br> 
-
-
-<a name="PixelArray.surface">
-<big><b>PixelArray.surface</big></b><br><ul>
-  <i>Gets the Surface the PixelArray uses.</i><br>
-  <tt>PixelArray.surface: Return Surface</tt><br>
-<p>The Surface, the PixelArray was created for. </p>
-<!--COMMENTS:PixelArray.surface--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="PixelArray.make_surface">
-<big><b>PixelArray.make_surface</big></b><br><ul>
-  <i>Creates a new Surface from the current PixelArray.</i><br>
-  <tt>PixelArray.make_surface (): Return Surface</tt><br>
-<p>Creates a new Surface from the current PixelArray. Depending on the current PixelArray the size, pixel order etc. will be different from the original Surface. </p>
-<pre>  # Create a new surface flipped around the vertical axis.
-  sf = pxarray[:,::-1].make_surface ()
-</pre><p>New in pygame <tt>1.8.1</tt>. </p>
-<!--COMMENTS:PixelArray.make_surface--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="PixelArray.replace">
-<big><b>PixelArray.replace</big></b><br><ul>
-  <i>Replaces the passed color in the PixelArray with another one.</i><br>
-  <tt>PixelArray.replace (color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)): Return None</tt><br>
-<p>Replaces the pixels with the passed color in the PixelArray by changing them them to the passed replacement color. </p>
-<p>It uses a simple weighted euclidian distance formula to calculate the distance between the colors. The distance space ranges from <tt>0.0</tt> to <tt>1.0</tt> and is used as threshold for the color detection. This causes the replacement to take pixels with a similar, but not exactly identical color, into account as well. </p>
-<p>This is an in place operation that directly affects the pixels of the PixelArray. </p>
-<p>New in pygame <tt>1.8.1</tt>. </p>
-<!--COMMENTS:PixelArray.replace--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="PixelArray.extract">
-<big><b>PixelArray.extract</big></b><br><ul>
-  <i>Extracts the passed color from the PixelArray.</i><br>
-  <tt>PixelArray.extract (color, distance=0, weights=(0.299, 0.587, 0.114)): Return PixelArray</tt><br>
-<p>Extracts the passed color by changing all matching pixels to white, while non-matching pixels are changed to black. This returns a new PixelArray with the black/white color mask. </p>
-<p>It uses a simple weighted euclidian distance formula to calculate the distance between the colors. The distance space ranges from <tt>0.0</tt> to <tt>1.0</tt> and is used as threshold for the color detection. This causes the extraction to take pixels with a similar, but not exactly identical color, into account as well. </p>
-<p>New in pygame <tt>1.8.1</tt>. </p>
-<!--COMMENTS:PixelArray.extract--> &nbsp;<br> 
-<br></ul>
-
-
-<a name="PixelArray.compare">
-<big><b>PixelArray.compare</big></b><br><ul>
-  <i>Compares the PixelArray with another one.</i><br>
-  <tt>PixelArray.compare (array, distance=0, weights=(0.299, 0.587, 0.114)): Return PixelArray</tt><br>
-<p>Compares the contents of the PixelArray with those from the passed PixelArray. It returns a new PixelArray with a black/white color mask that indicates the differences (white) of both arrays. Both PixelArray objects must have indentical bit depths and dimensions. </p>
-<p>It uses a simple weighted euclidian distance formula to calculate the distance between the colors. The distance space ranges from <tt>0.0</tt> to <tt>1.0</tt> and is used as threshold for the color detection. This causes the comparision to mark pixels with a similar, but not exactly identical color, as black. </p>
-<p>New in pygame <tt>1.8.1</tt>. </p>
-<!--COMMENTS:PixelArray.compare--> &nbsp;<br> 
-<br></ul>
-<br></ul>
-
-</body></html>
+
+<html>
+<title>pixelarray - 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="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="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="time.html">Time</a>&nbsp;||&nbsp;
+<a href="transform.html">Transform</a>
+</td></tr></table>
+<br>
+
+
+<a name="pygame.PixelArray">
+<big><b>pygame.PixelArray</big></b><br><ul>
+  <i>pygame object for direct pixel access of surfaces</i><br>
+  <tt>pygame.PixelArray(Surface): return PixelArray</tt><br>
+<ul><small><table>
+  <tr><td><a href="pixelarray.html#PixelArray.surface">PixelArray.surface</a> - <font size=-1>Gets the Surface the PixelArray uses.</font></td><td>Gets the Surface the PixelArray uses.</td></tr>
+  <tr><td><a href="pixelarray.html#PixelArray.make_surface">PixelArray.make_surface</a> - <font size=-1>Creates a new Surface from the current PixelArray.</font></td><td>Creates a new Surface from the current PixelArray.</td></tr>
+  <tr><td><a href="pixelarray.html#PixelArray.replace">PixelArray.replace</a> - <font size=-1>Replaces the passed color in the PixelArray with another one.</font></td><td>Replaces the passed color in the PixelArray with another one.</td></tr>
+  <tr><td><a href="pixelarray.html#PixelArray.extract">PixelArray.extract</a> - <font size=-1>Extracts the passed color from the PixelArray.</font></td><td>Extracts the passed color from the PixelArray.</td></tr>
+  <tr><td><a href="pixelarray.html#PixelArray.compare">PixelArray.compare</a> - <font size=-1>Compares the PixelArray with another one.</font></td><td>Compares the PixelArray with another one.</td></tr>
+</table></small></ul>
+<p>The PixelArray wraps up a Surface and provides a direct <tt>2D</tt> array access to its pixels using the surface its rows as first and its columns as second axis. It supports slicing, row and pixel manipluation, slicing and slice assignments while inplace operations such as addition, subtraction, multiplication, division and so forth are not allowed. </p>
+<p>While it is possible to assign both, integer color values and <tt>RGB(A)</tt> color tuples, the PixelArray will only use integers for the color representation. Thus, checking for certain colors has to be done using the <tt><a href="surface.html#Surface.map_rgb">Surface.map_rgb</a> - <font size=-1>convert a color into a mapped color value</font></tt> method of the surface, the PixelArray was created for. </p>
+<pre>  pxarray = pygame.PixelArray (surface)
+  # Check, if the first pixel at the topleft corner is blue
+  if pxarray[0][0] == surface.map_rgb ((0, 0, 255)):
+      ...
+</pre><p>Pixels can be manipulated using integer values or color tuples. </p>
+<pre>  pxarray[x][y] = 0xFF00FF
+  pxarray[x][y] = (255, 0, 255)
+</pre><p>If you operate on a slice, you also can use arbitrary sequences or other PixelArray objects to modify the pixels. They have to match the size of the PixelArray however. </p>
+<pre>  pxarray[a:b] = 0xFF00FF                   # set all pixels to 0xFF00FF
+  pxarray[a:b] = (0xFF00FF, 0xAACCEE, ... ) # first pixel = 0xFF00FF,
+                                            # second pixel  = 0xAACCEE, ...
+  pxarray[a:b] = ((255, 0, 255), (170, 204, 238), ...) # same as above
+  pxarray[a:b] = ((255, 0, 255), 0xAACCEE, ...)        # same as above
+  pxarray[a:b] = otherarray[x:y]            # slice sizes must match
+</pre><p>Note, that something like </p>
+<pre>  pxarray[2:4][3:5] = ...
+</pre><p>will not cause a rectangular manipulation. Instead it will be first sliced to a two-column array, which then shall be sliced by columns once more, which will fail due an IndexError. This is caused by the slicing mechanisms in python and an absolutely correct behaviour. Create a single columned slice first, which you can manipulate then: </p>
+<pre>  pxarray[2][3:5] = ...
+  pxarray[3][3:5] = ...
+</pre><p>If you want to make a rectangular manipulation or create a view of a part of the PixelArray, you also can use the subscript abilities. You can easily create different view by creating 'subarrays' using the subscripts. </p>
+<pre>  # Create some new PixelArray objects providing a different view
+  # of the original array/surface.
+  newarray = pxarray[2:4,3:5]
+  otherarray = pxarray[::2,::2]
+</pre><p>Subscripts also can be used to do fast rectangular pixel manipulations instead of iterating over the x or y axis as above. </p>
+<pre>  pxarray[::2,:] = (0, 0, 0)                # Make each second column black.
+</pre><p>During its lifetime, the PixelArray locks the surface, thus you explicitly have to delete it once its not used anymore and the surface should perform operations in the same scope. </p>
+<p>New in pygame <tt>1.8</tt>. Subscript support is new in pygame <tt>1.8.1</tt>. </p>
+<!--COMMENTS:pygame.PixelArray--> &nbsp;<br> 
+
+
+<a name="PixelArray.surface">
+<big><b>PixelArray.surface</big></b><br><ul>
+  <i>Gets the Surface the PixelArray uses.</i><br>
+  <tt>PixelArray.surface: Return Surface</tt><br>
+<p>The Surface, the PixelArray was created for. </p>
+<!--COMMENTS:PixelArray.surface--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="PixelArray.make_surface">
+<big><b>PixelArray.make_surface</big></b><br><ul>
+  <i>Creates a new Surface from the current PixelArray.</i><br>
+  <tt>PixelArray.make_surface (): Return Surface</tt><br>
+<p>Creates a new Surface from the current PixelArray. Depending on the current PixelArray the size, pixel order etc. will be different from the original Surface. </p>
+<pre>  # Create a new surface flipped around the vertical axis.
+  sf = pxarray[:,::-1].make_surface ()
+</pre><p>New in pygame <tt>1.8.1</tt>. </p>
+<!--COMMENTS:PixelArray.make_surface--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="PixelArray.replace">
+<big><b>PixelArray.replace</big></b><br><ul>
+  <i>Replaces the passed color in the PixelArray with another one.</i><br>
+  <tt>PixelArray.replace (color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)): Return None</tt><br>
+<p>Replaces the pixels with the passed color in the PixelArray by changing them them to the passed replacement color. </p>
+<p>It uses a simple weighted euclidian distance formula to calculate the distance between the colors. The distance space ranges from <tt>0.0</tt> to <tt>1.0</tt> and is used as threshold for the color detection. This causes the replacement to take pixels with a similar, but not exactly identical color, into account as well. </p>
+<p>This is an in place operation that directly affects the pixels of the PixelArray. </p>
+<p>New in pygame <tt>1.8.1</tt>. </p>
+<!--COMMENTS:PixelArray.replace--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="PixelArray.extract">
+<big><b>PixelArray.extract</big></b><br><ul>
+  <i>Extracts the passed color from the PixelArray.</i><br>
+  <tt>PixelArray.extract (color, distance=0, weights=(0.299, 0.587, 0.114)): Return PixelArray</tt><br>
+<p>Extracts the passed color by changing all matching pixels to white, while non-matching pixels are changed to black. This returns a new PixelArray with the black/white color mask. </p>
+<p>It uses a simple weighted euclidian distance formula to calculate the distance between the colors. The distance space ranges from <tt>0.0</tt> to <tt>1.0</tt> and is used as threshold for the color detection. This causes the extraction to take pixels with a similar, but not exactly identical color, into account as well. </p>