Index: src/pygamedocs.h
===================================================================
--- src/pygamedocs.h	(revision 1345)
+++ src/pygamedocs.h	(working copy)
@@ -241,6 +241,56 @@
 
 #define DOC_FONTGETDESCENT "Font.get_descent(): return int\nget the descent of the font"
 
+#define DOC_PYGAMEGFX "pygame module for drawing shapes"
+
+#define DOC_PYGAMEGFXPIXEL "pygame.gfx.pixel(Surface, point, color): return None\ndraw a pixel"
+
+#define DOC_PYGAMEGFXHORIZONTALLINE "pygame.gfx.horizontal_line(Surface, (x1, x2), y, color): return None\ndraw a horizontal line"
+
+#define DOC_PYGAMEGFXVERTICALLINE "pygame.gfx.vertical_line(Surface, x, (y1, y2), color): return None\ndraw a vertical line"
+
+#define DOC_PYGAMEGFXRECTANGLE "pygame.gfx.rectangle(Surface, Rect, color): return None\ndraw a rectangle"
+
+#define DOC_PYGAMEGFXBOX "pygame.gfx.box(Surface, Rect, color): return None\ndraw a box"
+
+#define DOC_PYGAMEGFXLINE "pygame.gfx.line(Surface, start, end, color): return None\ndraw a line"
+
+#define DOC_PYGAMEGFXAALINE "pygame.gfx.aaline(Surface, start, end, color): return None\ndraw an antialiased line"
+
+#define DOC_PYGAMEGFXCIRCLE "pygame.gfx.circle(Surface, center radius, color): return None\ndraw a circle"
+
+#define DOC_PYGAMEGFXAACIRCLE "pygame.gfx.aacircle(Surface, center, radius, color): return None\ndraw an antialiased circle"
+
+#define DOC_PYGAMEGFXFILLEDCIRCLE "pygame.gfx.filled_circle(Surface, center, radius, color): return None\ndraw a filled circle"
+
+#define DOC_PYGAMEGFXELLIPSE "pygame.gfx.ellipse(Surface, Rect, color): return None\ndraw an ellipse"
+
+#define DOC_PYGAMEGFXAAELLIPSE "pygame.gfx.aaellipse(Surface, Rect, color): return None\ndraw an antialiased ellipse"
+
+#define DOC_PYGAMEGFXFILLEDELLIPSE "pygame.gfx.filled_ellipse(Surface, Rect, color): return None\ndraw a filled ellipse"
+
+#define DOC_PYGAMEGFXARC "pygame.gfx.arc(Surface, center, radius, start, end, color): return None\ndraw an arc"
+
+#define DOC_PYGAMEGFXPIE "pygame.gfx.pie(Surface, center, radius, start, end, color): return None\ndraw a pie"
+
+#define DOC_PYGAMEGFXFILLEDPIE "pygame.gfx.filled_pie(Surface, center, radius, start, end, color): return None\ndraw a filled pie"
+
+#define DOC_PYGAMEGFXTRIGON "pygame.gfx.trigon(Surface, point, point, point, color): return None\ndraw a trigon"
+
+#define DOC_PYGAMEGFXAATRIGON "pygame.gfx.aatrigon(Surface, point, point, point, color): return None\ndraw an antialiased trigon"
+
+#define DOC_PYGAMEGFXFILLEDTRIGON "pygame.gfx.filled_trigon(Surface, point, point, point, color): return None\ndraw a filled trigon"
+
+#define DOC_PYGAMEGFXPOLYGON "pygame.gfx.polygon(Surface, pointlist, color): return None\ndraw a polygon"
+
+#define DOC_PYGAMEGFXAAPOLYGON "pygame.gfx.aapolygon(Surface, pointlist, color): return None\ndraw an antialiased polygon"
+
+#define DOC_PYGAMEGFXFILLEDPOLYGON "pygame.gfx.filled_polygon(Surface, pointlist, color): return None\ndraw a filled polygon"
+
+#define DOC_PYGAMEGFXTEXTUREDPOLYGON "pygame.gfx.textured_polygon(Surface, pointlist, texture, texx, texy): return None\ndraw a textured polygon"
+
+#define DOC_PYGAMEGFXBEZIER "pygame.gfx.bezier(Surface, points, steps, color): return None\ndraw a bezier"
+
 #define DOC_PYGAMEIMAGE "pygame module for image transfer"
 
 #define DOC_PYGAMEIMAGELOAD "pygame.image.load(filename): return Surface\npygame.image.load(fileobj, namehint=""): return Surface\nload new image from a file"
Index: src/gfx.doc
===================================================================
--- src/gfx.doc	(revision 0)
+++ src/gfx.doc	(revision 0)
@@ -0,0 +1,233 @@
+pygame.gfx
+pygame module for drawing shapes
+
+Draw many shapes to a Surface. These functions will work for rendering
+to any format of Surface. Rendering to hardware Surfaces will be slower
+than regular software Surfaces.
+
+Most of the arguments accept a color argument that is an RGB triplet.
+These can also accept an RGBA quadruplet. The alpha value will be blended
+with the Surface if it contains pixel alphas. The color argument can also be
+an integer pixel value that is already mapped to the Surface's pixel format.
+
+These functions must temporarily lock the Surface they are operating on.
+Many sequential drawing calls can be sped up by locking and unlocking
+the Surface object around the draw calls.
+<SECTION>
+
+
+
+pixel
+draw a pixel
+pygame.gfx.pixel(Surface, point, color): return None
+
+DESC
+<END>
+
+
+
+horizontal_line
+draw a horizontal line
+pygame.gfx.horizontal_line(Surface, (x1, x2), y, color): return None
+
+DESC
+<END>
+
+
+
+vertical_line
+draw a vertical line
+pygame.gfx.vertical_line(Surface, x, (y1, y2), color): return None
+
+DESC
+<END>
+
+
+
+rectangle
+draw a rectangle
+pygame.gfx.rectangle(Surface, Rect, color): return None
+
+DESC
+<END>
+
+
+
+box
+draw a box
+pygame.gfx.box(Surface, Rect, color): return None
+
+DESC
+<END>
+
+
+
+line
+draw a line
+pygame.gfx.line(Surface, start, end, color): return None
+
+DESC
+<END>
+
+
+
+aaline
+draw an antialiased line
+pygame.gfx.aaline(Surface, start, end, color): return None
+
+DESC
+<END>
+
+
+
+circle
+draw a circle
+pygame.gfx.circle(Surface, center radius, color): return None
+
+DESC
+<END>
+
+
+
+aacircle
+draw an antialiased circle
+pygame.gfx.aacircle(Surface, center, radius, color): return None
+
+DESC
+<END>
+
+
+
+filled_circle
+draw a filled circle
+pygame.gfx.filled_circle(Surface, center, radius, color): return None
+
+DESC
+<END>
+
+
+
+ellipse
+draw an ellipse
+pygame.gfx.ellipse(Surface, Rect, color): return None
+
+DESC
+<END>
+
+
+
+aaellipse
+draw an antialiased ellipse
+pygame.gfx.aaellipse(Surface, Rect, color): return None
+
+DESC
+<END>
+
+
+
+filled_ellipse
+draw a filled ellipse
+pygame.gfx.filled_ellipse(Surface, Rect, color): return None
+
+DESC
+<END>
+
+
+
+arc
+draw an arc
+pygame.gfx.arc(Surface, center, radius, start, end, color): return None
+
+DESC
+<END>
+
+
+
+pie
+draw a pie
+pygame.gfx.pie(Surface, center, radius, start, end, color): return None
+
+DESC
+<END>
+
+
+
+filled_pie
+draw a filled pie
+pygame.gfx.filled_pie(Surface, center, radius, start, end, color): return None
+
+DESC
+<END>
+
+
+
+trigon
+draw a trigon
+pygame.gfx.trigon(Surface, point, point, point, color): return None
+
+DESC
+<END>
+
+
+
+aatrigon
+draw an antialiased trigon
+pygame.gfx.aatrigon(Surface, point, point, point, color): return None
+
+DESC
+<END>
+
+
+
+filled_trigon
+draw a filled trigon
+pygame.gfx.filled_trigon(Surface, point, point, point, color): return None
+
+DESC
+<END>
+
+
+
+polygon
+draw a polygon
+pygame.gfx.polygon(Surface, pointlist, color): return None
+
+DESC
+<END>
+
+
+
+aapolygon
+draw an antialiased polygon
+pygame.gfx.aapolygon(Surface, pointlist, color): return None
+
+DESC
+<END>
+
+
+
+filled_polygon
+draw a filled polygon
+pygame.gfx.filled_polygon(Surface, pointlist, color): return None
+
+DESC
+<END>
+
+
+
+textured_polygon
+draw a textured polygon
+pygame.gfx.textured_polygon(Surface, pointlist, texture, texx, texy): return None
+
+DESC
+<END>
+
+
+
+bezier
+draw a bezier
+pygame.gfx.bezier(Surface, points, steps, color): return None
+
+DESC
+<END>
+<END>
Index: src/gfx.c
===================================================================
--- src/gfx.c	(revision 0)
+++ src/gfx.c	(revision 0)
@@ -0,0 +1,695 @@
+/*
+  pygame - Python Game Library
+  Copyright (C) 2000-2001  Pete Shinners
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Library General Public
+  License as published by the Free Software Foundation; either
+  version 2 of the License, or (at your option) any later version.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Library General Public License for more details.
+
+  You should have received a copy of the GNU Library General Public
+  License along with this library; if not, write to the Free
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+  Pete Shinners
+  pete@shinners.org
+*/
+
+#include "pygame.h"
+#include "pygamedocs.h"
+
+#include <SDL_gfxPrimitives.h>
+
+static PyObject*
+pixel (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x, y;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)O", &PySurface_Type, &surfobj, &x, &y, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        pixelRGBA(surf, x, y, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+horizontal_line (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x1, x2, y;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)iO", &PySurface_Type, &surfobj, &x1, &x2, &y, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        hlineRGBA(surf, x1, x2, y, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+vertical_line (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x, y1, y2;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!i(ii)O", &PySurface_Type, &surfobj, &x, &y1, &y2, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        vlineRGBA(surf, x, y1, y2, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+rectangle (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj, *rectobj;
+        SDL_Surface* surf;
+        GAME_Rect* rect, temp;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!OO", &PySurface_Type, &surfobj, &rectobj, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        if(!(rect = GameRect_FromObject(rectobj, &temp)))
+                return RAISE(PyExc_TypeError, "Rect argument is invalid");
+
+        rectangleRGBA(surf, rect->x, rect->y, rect->x+rect->w, rect->y+rect->h, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+box (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj, *rectobj;
+        SDL_Surface* surf;
+        GAME_Rect* rect, temp;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!OO", &PySurface_Type, &surfobj, &rectobj, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        if(!(rect = GameRect_FromObject(rectobj, &temp)))
+                return RAISE(PyExc_TypeError, "Rect argument is invalid");
+
+        boxRGBA(surf, rect->x, rect->y, rect->x+rect->w, rect->y+rect->h, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+line (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x1, x2, y1, y2;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)(ii)O", &PySurface_Type, &surfobj, &x1, &x2, &y1, &y2, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        lineRGBA(surf, x1, x2, y1, y2, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+aaline (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x1, x2, y1, y2;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)(ii)O", &PySurface_Type, &surfobj, &x1, &x2, &y1, &y2, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        aalineRGBA(surf, x1, x2, y1, y2, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+circle (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x, y, r;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)iO", &PySurface_Type, &surfobj, &x, &y, &r, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        circleRGBA(surf, x, y, r, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+aacircle (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x, y, r;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)iO", &PySurface_Type, &surfobj, &x, &y, &r, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        aacircleRGBA(surf, x, y, r, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+filled_circle (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x, y, r;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)iO", &PySurface_Type, &surfobj, &x, &y, &r, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        filledCircleRGBA(surf, x, y, r, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+ellipse (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj, *rectobj;
+        SDL_Surface* surf;
+        GAME_Rect* rect, temp;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!OO", &PySurface_Type, &surfobj, &rectobj, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        if(!(rect = GameRect_FromObject(rectobj, &temp)))
+                return RAISE(PyExc_TypeError, "Rect argument is invalid");
+
+        ellipseRGBA(surf, rect->x+rect->w/2, rect->y+rect->h/2, rect->w/2, rect->h/2, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+aaellipse (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj, *rectobj;
+        SDL_Surface* surf;
+        GAME_Rect* rect, temp;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!OO", &PySurface_Type, &surfobj, &rectobj, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        if(!(rect = GameRect_FromObject(rectobj, &temp)))
+                return RAISE(PyExc_TypeError, "Rect argument is invalid");
+
+        aaellipseRGBA(surf, rect->x+rect->w/2, rect->y+rect->h/2, rect->w/2, rect->h/2, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+filled_ellipse (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj, *rectobj;
+        SDL_Surface* surf;
+        GAME_Rect* rect, temp;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!OO", &PySurface_Type, &surfobj, &rectobj, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        if(!(rect = GameRect_FromObject(rectobj, &temp)))
+                return RAISE(PyExc_TypeError, "Rect argument is invalid");
+
+        filledEllipseRGBA(surf, rect->x+rect->w/2, rect->y+rect->h/2, rect->w/2, rect->h/2, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+/*
+static PyObject*
+arc (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x, y, r, s, e;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)i(ii)O", &PySurface_Type, &surfobj, &x, &y, &r, &s, &e, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        arcRGBA(surf, x, y, r, s, e, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+*/
+static PyObject*
+pie (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x, y, r, s, e;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)i(ii)O", &PySurface_Type, &surfobj, &x, &y, &r, &s, &e, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        pieRGBA(surf, x, y, r, s, e, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+filled_pie (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x, y, r, s, e;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)i(ii)O", &PySurface_Type, &surfobj, &x, &y, &r, &s, &e, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        filledPieRGBA(surf, x, y, r, s, e, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+trigon (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x1, y1, x2, y2, x3, y3;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)(ii)(ii)O", &PySurface_Type, &surfobj, &x1, &y1, &x2, &y2, &x3, &y3, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        trigonRGBA(surf, x1, y1, x2, y2, x3, y3, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+aatrigon (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x1, y1, x2, y2, x3, y3;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)(ii)(ii)O", &PySurface_Type, &surfobj, &x1, &y1, &x2, &y2, &x3, &y3, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        aatrigonRGBA(surf, x1, y1, x2, y2, x3, y3, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+filled_trigon (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj;
+        SDL_Surface* surf;
+        int x1, y1, x2, y2, x3, y3;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!(ii)(ii)(ii)O", &PySurface_Type, &surfobj, &x1, &y1, &x2, &y2, &x3, &y3, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+        
+        filledTrigonRGBA(surf, x1, y1, x2, y2, x3, y3, rgba[0], rgba[1], rgba[2], rgba[3]);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+polygon (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj, *points;
+        SDL_Surface* surf;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!OO", &PySurface_Type, &surfobj, &points, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+
+        if(!PySequence_Check(points))
+                return RAISE(PyExc_TypeError, "points argument must be a sequence of number pairs");
+        int length = PySequence_Length(points);
+        if(length < 3)
+                return RAISE(PyExc_ValueError, "points argument must contain more than 2 points");
+        PyObject *item = PySequence_GetItem(points, 0);
+        int loop, x, y;
+        int result = TwoIntsFromObj(item, &x, &y);
+        Py_DECREF(item);
+        if(!result) return RAISE(PyExc_TypeError, "points must be number pairs");
+        
+        Sint16 *xlist = PyMem_New(Sint16, length);
+        Sint16 *ylist = PyMem_New(Sint16, length);
+
+        int numpoints = 0;
+        for(loop = 0; loop < length; ++loop)
+        {
+                item = PySequence_GetItem(points, loop);
+                result = TwoIntsFromObj(item, &x, &y);
+                Py_DECREF(item);
+                if(!result) continue; /*note, we silently skip over bad points :[ */
+                xlist[numpoints] = x;
+                ylist[numpoints] = y;
+                numpoints++;
+        }
+
+        polygonRGBA(surf, xlist, ylist, numpoints, rgba[0], rgba[1], rgba[2], rgba[3]);
+        PyMem_Del(xlist); PyMem_Del(ylist);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+aapolygon (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj, *points;
+        SDL_Surface* surf;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!OO", &PySurface_Type, &surfobj, &points, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+
+        if(!PySequence_Check(points))
+                return RAISE(PyExc_TypeError, "points argument must be a sequence of number pairs");
+        int length = PySequence_Length(points);
+        if(length < 3)
+                return RAISE(PyExc_ValueError, "points argument must contain more than 2 points");
+        PyObject *item = PySequence_GetItem(points, 0);
+        int loop, x, y;
+        int result = TwoIntsFromObj(item, &x, &y);
+        Py_DECREF(item);
+        if(!result) return RAISE(PyExc_TypeError, "points must be number pairs");
+        
+        Sint16 *xlist = PyMem_New(Sint16, length);
+        Sint16 *ylist = PyMem_New(Sint16, length);
+
+        int numpoints = 0;
+        for(loop = 0; loop < length; ++loop)
+        {
+                item = PySequence_GetItem(points, loop);
+                result = TwoIntsFromObj(item, &x, &y);
+                Py_DECREF(item);
+                if(!result) continue; /*note, we silently skip over bad points :[ */
+                xlist[numpoints] = x;
+                ylist[numpoints] = y;
+                numpoints++;
+        }
+
+        aapolygonRGBA(surf, xlist, ylist, numpoints, rgba[0], rgba[1], rgba[2], rgba[3]);
+        PyMem_Del(xlist); PyMem_Del(ylist);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+filled_polygon (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj, *points;
+        SDL_Surface* surf;
+        Uint8 rgba[4];
+
+        if(!PyArg_ParseTuple(arg, "O!OO", &PySurface_Type, &surfobj, &points, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+
+        if(!PySequence_Check(points))
+                return RAISE(PyExc_TypeError, "points argument must be a sequence of number pairs");
+        int length = PySequence_Length(points);
+        if(length < 3)
+                return RAISE(PyExc_ValueError, "points argument must contain more than 2 points");
+        PyObject *item = PySequence_GetItem(points, 0);
+        int loop, x, y;
+        int result = TwoIntsFromObj(item, &x, &y);
+        Py_DECREF(item);
+        if(!result) return RAISE(PyExc_TypeError, "points must be number pairs");
+        
+        Sint16 *xlist = PyMem_New(Sint16, length);
+        Sint16 *ylist = PyMem_New(Sint16, length);
+
+        int numpoints = 0;
+        for(loop = 0; loop < length; ++loop)
+        {
+                item = PySequence_GetItem(points, loop);
+                result = TwoIntsFromObj(item, &x, &y);
+                Py_DECREF(item);
+                if(!result) continue; /*note, we silently skip over bad points :[ */
+                xlist[numpoints] = x;
+                ylist[numpoints] = y;
+                numpoints++;
+        }
+
+        filledPolygonRGBA(surf, xlist, ylist, numpoints, rgba[0], rgba[1], rgba[2], rgba[3]);
+        PyMem_Del(xlist); PyMem_Del(ylist);
+        
+        Py_RETURN_NONE;
+}
+
+static PyObject*
+textured_polygon (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *points, *texobj;
+        SDL_Surface *surf, *tex;
+        int texx, texy;
+
+        if(!PyArg_ParseTuple(arg, "O!OO!(ii)", &PySurface_Type, &surfobj, &points, &PySurface_Type, &texobj, &texx, &texy))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+        tex = PySurface_AsSurface(texobj);
+
+        if(!PySequence_Check(points))
+                return RAISE(PyExc_TypeError, "points argument must be a sequence of number pairs");
+        int length = PySequence_Length(points);
+        if(length < 3)
+                return RAISE(PyExc_ValueError, "points argument must contain more than 2 points");
+        PyObject *item = PySequence_GetItem(points, 0);
+        int loop, x, y;
+        int result = TwoIntsFromObj(item, &x, &y);
+        Py_DECREF(item);
+        if(!result) return RAISE(PyExc_TypeError, "points must be number pairs");
+        
+        Sint16 *xlist = PyMem_New(Sint16, length);
+        Sint16 *ylist = PyMem_New(Sint16, length);
+
+        int numpoints = 0;
+        for(loop = 0; loop < length; ++loop)
+        {
+                item = PySequence_GetItem(points, loop);
+                result = TwoIntsFromObj(item, &x, &y);
+                Py_DECREF(item);
+                if(!result) continue; /*note, we silently skip over bad points :[ */
+                xlist[numpoints] = x;
+                ylist[numpoints] = y;
+                numpoints++;
+        }
+
+        texturedPolygonRGBA(surf, xlist, ylist, numpoints, tex, texx, texy);
+        PyMem_Del(xlist); PyMem_Del(ylist);
+        
+        Py_RETURN_NONE;
+}
+
+
+static PyObject*
+bezier (PyObject* self, PyObject* arg)
+{
+        PyObject *surfobj, *colorobj, *points;
+        SDL_Surface* surf;
+        Uint8 rgba[4];
+        int steps;
+
+        if(!PyArg_ParseTuple(arg, "O!OiO", &PySurface_Type, &surfobj, &points, &steps, &colorobj))
+                return NULL;
+        surf = PySurface_AsSurface(surfobj);
+
+        if(!RGBAFromColorObj(colorobj, rgba))
+                return RAISE(PyExc_TypeError, "invalid color argument");
+
+        if(!PySequence_Check(points))
+                return RAISE(PyExc_TypeError, "points argument must be a sequence of number pairs");
+        int length = PySequence_Length(points);
+        if(length < 3)
+                return RAISE(PyExc_ValueError, "points argument must contain more than 2 points");
+        PyObject *item = PySequence_GetItem(points, 0);
+        int loop, x, y;
+        int result = TwoIntsFromObj(item, &x, &y);
+        Py_DECREF(item);
+        if(!result) return RAISE(PyExc_TypeError, "points must be number pairs");
+        
+        Sint16 *xlist = PyMem_New(Sint16, length);
+        Sint16 *ylist = PyMem_New(Sint16, length);
+
+        int numpoints = 0;
+        for(loop = 0; loop < length; ++loop)
+        {
+                item = PySequence_GetItem(points, loop);
+                result = TwoIntsFromObj(item, &x, &y);
+                Py_DECREF(item);
+                if(!result) continue; /*note, we silently skip over bad points :[ */
+                xlist[numpoints] = x;
+                ylist[numpoints] = y;
+                numpoints++;
+        }
+
+        bezierRGBA(surf, xlist, ylist, numpoints, steps, rgba[0], rgba[1], rgba[2], rgba[3]);
+        PyMem_Del(xlist); PyMem_Del(ylist);
+        
+        Py_RETURN_NONE;
+}
+
+static PyMethodDef gfx_builtins[] =
+{
+    { "pixel", pixel, METH_VARARGS, DOC_PYGAMEGFXPIXEL },
+    { "horizontal_line", horizontal_line, METH_VARARGS, DOC_PYGAMEGFXHORIZONTALLINE },
+    { "vertical_line", vertical_line, METH_VARARGS, DOC_PYGAMEGFXVERTICALLINE },
+    { "rectangle", rectangle, METH_VARARGS, DOC_PYGAMEGFXRECTANGLE },
+    { "box", box, METH_VARARGS, DOC_PYGAMEGFXBOX },
+    { "line", line, METH_VARARGS, DOC_PYGAMEGFXLINE },
+    { "aaline", aaline, METH_VARARGS, DOC_PYGAMEGFXAALINE },
+    { "circle", circle, METH_VARARGS, DOC_PYGAMEGFXCIRCLE },
+    { "aacircle", aacircle, METH_VARARGS, DOC_PYGAMEGFXAACIRCLE },
+    { "filled_circle", filled_circle, METH_VARARGS, DOC_PYGAMEGFXFILLEDCIRCLE },
+    { "ellipse", ellipse, METH_VARARGS, DOC_PYGAMEGFXELLIPSE },
+    { "aaellipse", aaellipse, METH_VARARGS, DOC_PYGAMEGFXAAELLIPSE },
+    { "filled_ellipse", filled_ellipse, METH_VARARGS, DOC_PYGAMEGFXFILLEDELLIPSE },
+    /* { "arc", arc, METH_VARARGS, DOC_PYGAMEGFXARC }, */
+    { "pie", pie, METH_VARARGS, DOC_PYGAMEGFXPIE },
+    { "filled_pie", filled_pie, METH_VARARGS, DOC_PYGAMEGFXFILLEDPIE },
+    { "trigon", trigon, METH_VARARGS, DOC_PYGAMEGFXTRIGON },
+    { "aatrigon", aatrigon, METH_VARARGS, DOC_PYGAMEGFXAATRIGON },
+    { "filled_trigon", filled_trigon, METH_VARARGS, DOC_PYGAMEGFXFILLEDTRIGON },
+    { "polygon", polygon, METH_VARARGS, DOC_PYGAMEGFXPOLYGON },
+    { "aapolygon", aapolygon, METH_VARARGS, DOC_PYGAMEGFXAAPOLYGON },
+    { "filled_polygon", filled_polygon, METH_VARARGS, DOC_PYGAMEGFXFILLEDPOLYGON },
+    { "textured_polygon", textured_polygon, METH_VARARGS, DOC_PYGAMEGFXTEXTUREDPOLYGON },
+    { "bezier", bezier, METH_VARARGS, DOC_PYGAMEGFXBEZIER },
+
+    { NULL, NULL, 0, NULL }
+};
+
+PYGAME_EXPORT
+void initgfx (void)
+{
+    PyObject *module;
+    
+    /* create the module */
+    module = Py_InitModule3 ("gfx", gfx_builtins, DOC_PYGAMEGFX);
+    
+    import_pygame_base ();
+    import_pygame_surface ();
+    import_pygame_color ();
+    import_pygame_rect ();
+}
Index: docs/ref/surfarray.html
===================================================================
--- docs/ref/surfarray.html	(revision 1345)
+++ docs/ref/surfarray.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/color.html
===================================================================
--- docs/ref/color.html	(revision 1345)
+++ docs/ref/color.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
@@ -134,7 +135,7 @@
 <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> = [-1/3, 1/3], <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>
+<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>
 
Index: docs/ref/movie.html
===================================================================
--- docs/ref/movie.html	(revision 1345)
+++ docs/ref/movie.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/pixelarray.html
===================================================================
--- docs/ref/pixelarray.html	(revision 1345)
+++ docs/ref/pixelarray.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/music.html
===================================================================
--- docs/ref/music.html	(revision 1345)
+++ docs/ref/music.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/overlay.html
===================================================================
--- docs/ref/overlay.html	(revision 1345)
+++ docs/ref/overlay.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/event.html
===================================================================
--- docs/ref/event.html	(revision 1345)
+++ docs/ref/event.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/pygame.html
===================================================================
--- docs/ref/pygame.html	(revision 1345)
+++ docs/ref/pygame.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/image.html
===================================================================
--- docs/ref/image.html	(revision 1345)
+++ docs/ref/image.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/sndarray.html
===================================================================
--- docs/ref/sndarray.html	(revision 1345)
+++ docs/ref/sndarray.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/gfx.html
===================================================================
--- docs/ref/gfx.html	(revision 0)
+++ docs/ref/gfx.html	(revision 0)
@@ -0,0 +1,299 @@
+
+<html>
+<title>gfx - 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="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="gfx.html">Gfx</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="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.gfx">
+<big><b>pygame.gfx</big></b><br><ul>
+  <i>pygame module for drawing shapes</i><br>
+<ul><small><table>
+  <tr><td><a href="gfx.html#pygame.gfx.pixel">pygame.gfx.pixel</a> - <font size=-1>draw a pixel</font></td><td>draw a pixel</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.horizontal_line">pygame.gfx.horizontal_line</a> - <font size=-1>draw a horizontal line</font></td><td>draw a horizontal line</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.vertical_line">pygame.gfx.vertical_line</a> - <font size=-1>draw a vertical line</font></td><td>draw a vertical line</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.rectangle">pygame.gfx.rectangle</a> - <font size=-1>draw a rectangle</font></td><td>draw a rectangle</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.box">pygame.gfx.box</a> - <font size=-1>draw a box</font></td><td>draw a box</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.line">pygame.gfx.line</a> - <font size=-1>draw a line</font></td><td>draw a line</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.aaline">pygame.gfx.aaline</a> - <font size=-1>draw an antialiased line</font></td><td>draw an antialiased line</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.circle">pygame.gfx.circle</a> - <font size=-1>draw a circle</font></td><td>draw a circle</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.aacircle">pygame.gfx.aacircle</a> - <font size=-1>draw an antialiased circle</font></td><td>draw an antialiased circle</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.filled_circle">pygame.gfx.filled_circle</a> - <font size=-1>draw a filled circle</font></td><td>draw a filled circle</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.ellipse">pygame.gfx.ellipse</a> - <font size=-1>draw an ellipse</font></td><td>draw an ellipse</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.aaellipse">pygame.gfx.aaellipse</a> - <font size=-1>draw an antialiased ellipse</font></td><td>draw an antialiased ellipse</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.filled_ellipse">pygame.gfx.filled_ellipse</a> - <font size=-1>draw a filled ellipse</font></td><td>draw a filled ellipse</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.arc">pygame.gfx.arc</a> - <font size=-1>draw an arc</font></td><td>draw an arc</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.pie">pygame.gfx.pie</a> - <font size=-1>draw a pie</font></td><td>draw a pie</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.filled_pie">pygame.gfx.filled_pie</a> - <font size=-1>draw a filled pie</font></td><td>draw a filled pie</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.trigon">pygame.gfx.trigon</a> - <font size=-1>draw a trigon</font></td><td>draw a trigon</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.aatrigon">pygame.gfx.aatrigon</a> - <font size=-1>draw an antialiased trigon</font></td><td>draw an antialiased trigon</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.filled_trigon">pygame.gfx.filled_trigon</a> - <font size=-1>draw a filled trigon</font></td><td>draw a filled trigon</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.polygon">pygame.gfx.polygon</a> - <font size=-1>draw a polygon</font></td><td>draw a polygon</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.aapolygon">pygame.gfx.aapolygon</a> - <font size=-1>draw an antialiased polygon</font></td><td>draw an antialiased polygon</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.filled_polygon">pygame.gfx.filled_polygon</a> - <font size=-1>draw a filled polygon</font></td><td>draw a filled polygon</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.textured_polygon">pygame.gfx.textured_polygon</a> - <font size=-1>draw a textured polygon</font></td><td>draw a textured polygon</td></tr>
+  <tr><td><a href="gfx.html#pygame.gfx.bezier">pygame.gfx.bezier</a> - <font size=-1>draw a bezier</font></td><td>draw a bezier</td></tr>
+</table></small></ul>
+<p>Draw many shapes to a Surface. These functions will work for rendering to any format of Surface. Rendering to hardware Surfaces will be slower than regular software Surfaces. </p>
+<p>Most of the arguments accept a color argument that is an <tt>RGB</tt> triplet. These can also accept an <tt>RGBA</tt> quadruplet. The alpha value will be blended with the Surface if it contains pixel alphas. The color argument can also be an integer pixel value that is already mapped to the Surface's pixel format. </p>
+<p>These functions must temporarily lock the Surface they are operating on. Many sequential drawing calls can be sped up by locking and unlocking the Surface object around the draw calls. </p>
+<!--COMMENTS:pygame.gfx--> &nbsp;<br> 
+
+
+<a name="pygame.gfx.pixel">
+<big><b>pygame.gfx.pixel</big></b><br><ul>
+  <i>draw a pixel</i><br>
+  <tt>pygame.gfx.pixel(Surface, point, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.pixel--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.horizontal_line">
+<big><b>pygame.gfx.horizontal_line</big></b><br><ul>
+  <i>draw a horizontal line</i><br>
+  <tt>pygame.gfx.horizontal_line(Surface, (x1, x2), y, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.horizontal_line--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.vertical_line">
+<big><b>pygame.gfx.vertical_line</big></b><br><ul>
+  <i>draw a vertical line</i><br>
+  <tt>pygame.gfx.vertical_line(Surface, x, (y1, y2), color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.vertical_line--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.rectangle">
+<big><b>pygame.gfx.rectangle</big></b><br><ul>
+  <i>draw a rectangle</i><br>
+  <tt>pygame.gfx.rectangle(Surface, Rect, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.rectangle--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.box">
+<big><b>pygame.gfx.box</big></b><br><ul>
+  <i>draw a box</i><br>
+  <tt>pygame.gfx.box(Surface, Rect, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.box--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.line">
+<big><b>pygame.gfx.line</big></b><br><ul>
+  <i>draw a line</i><br>
+  <tt>pygame.gfx.line(Surface, start, end, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.line--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.aaline">
+<big><b>pygame.gfx.aaline</big></b><br><ul>
+  <i>draw an antialiased line</i><br>
+  <tt>pygame.gfx.aaline(Surface, start, end, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.aaline--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.circle">
+<big><b>pygame.gfx.circle</big></b><br><ul>
+  <i>draw a circle</i><br>
+  <tt>pygame.gfx.circle(Surface, center radius, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.circle--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.aacircle">
+<big><b>pygame.gfx.aacircle</big></b><br><ul>
+  <i>draw an antialiased circle</i><br>
+  <tt>pygame.gfx.aacircle(Surface, center, radius, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.aacircle--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.filled_circle">
+<big><b>pygame.gfx.filled_circle</big></b><br><ul>
+  <i>draw a filled circle</i><br>
+  <tt>pygame.gfx.filled_circle(Surface, center, radius, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.filled_circle--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.ellipse">
+<big><b>pygame.gfx.ellipse</big></b><br><ul>
+  <i>draw an ellipse</i><br>
+  <tt>pygame.gfx.ellipse(Surface, Rect, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.ellipse--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.aaellipse">
+<big><b>pygame.gfx.aaellipse</big></b><br><ul>
+  <i>draw an antialiased ellipse</i><br>
+  <tt>pygame.gfx.aaellipse(Surface, Rect, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.aaellipse--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.filled_ellipse">
+<big><b>pygame.gfx.filled_ellipse</big></b><br><ul>
+  <i>draw a filled ellipse</i><br>
+  <tt>pygame.gfx.filled_ellipse(Surface, Rect, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.filled_ellipse--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.arc">
+<big><b>pygame.gfx.arc</big></b><br><ul>
+  <i>draw an arc</i><br>
+  <tt>pygame.gfx.arc(Surface, center, radius, start, end, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.arc--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.pie">
+<big><b>pygame.gfx.pie</big></b><br><ul>
+  <i>draw a pie</i><br>
+  <tt>pygame.gfx.pie(Surface, center, radius, start, end, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.pie--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.filled_pie">
+<big><b>pygame.gfx.filled_pie</big></b><br><ul>
+  <i>draw a filled pie</i><br>
+  <tt>pygame.gfx.filled_pie(Surface, center, radius, start, end, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.filled_pie--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.trigon">
+<big><b>pygame.gfx.trigon</big></b><br><ul>
+  <i>draw a trigon</i><br>
+  <tt>pygame.gfx.trigon(Surface, point, point, point, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.trigon--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.aatrigon">
+<big><b>pygame.gfx.aatrigon</big></b><br><ul>
+  <i>draw an antialiased trigon</i><br>
+  <tt>pygame.gfx.aatrigon(Surface, point, point, point, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.aatrigon--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.filled_trigon">
+<big><b>pygame.gfx.filled_trigon</big></b><br><ul>
+  <i>draw a filled trigon</i><br>
+  <tt>pygame.gfx.filled_trigon(Surface, point, point, point, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.filled_trigon--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.polygon">
+<big><b>pygame.gfx.polygon</big></b><br><ul>
+  <i>draw a polygon</i><br>
+  <tt>pygame.gfx.polygon(Surface, pointlist, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.polygon--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.aapolygon">
+<big><b>pygame.gfx.aapolygon</big></b><br><ul>
+  <i>draw an antialiased polygon</i><br>
+  <tt>pygame.gfx.aapolygon(Surface, pointlist, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.aapolygon--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.filled_polygon">
+<big><b>pygame.gfx.filled_polygon</big></b><br><ul>
+  <i>draw a filled polygon</i><br>
+  <tt>pygame.gfx.filled_polygon(Surface, pointlist, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.filled_polygon--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.textured_polygon">
+<big><b>pygame.gfx.textured_polygon</big></b><br><ul>
+  <i>draw a textured polygon</i><br>
+  <tt>pygame.gfx.textured_polygon(Surface, pointlist, texture, texx, texy): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.textured_polygon--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.gfx.bezier">
+<big><b>pygame.gfx.bezier</big></b><br><ul>
+  <i>draw a bezier</i><br>
+  <tt>pygame.gfx.bezier(Surface, points, steps, color): return None</tt><br>
+<p><tt>DESC</tt> </p>
+<!--COMMENTS:pygame.gfx.bezier--> &nbsp;<br> 
+<br></ul>
+<br></ul>
+
+</body></html>
Index: docs/ref/mixer.html
===================================================================
--- docs/ref/mixer.html	(revision 1345)
+++ docs/ref/mixer.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/key.html
===================================================================
--- docs/ref/key.html	(revision 1345)
+++ docs/ref/key.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/mouse.html
===================================================================
--- docs/ref/mouse.html	(revision 1345)
+++ docs/ref/mouse.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/surface.html
===================================================================
--- docs/ref/surface.html	(revision 1345)
+++ docs/ref/surface.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/mask.html
===================================================================
--- docs/ref/mask.html	(revision 1345)
+++ docs/ref/mask.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/draw.html
===================================================================
--- docs/ref/draw.html	(revision 1345)
+++ docs/ref/draw.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/rect.html
===================================================================
--- docs/ref/rect.html	(revision 1345)
+++ docs/ref/rect.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/time.html
===================================================================
--- docs/ref/time.html	(revision 1345)
+++ docs/ref/time.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/joystick.html
===================================================================
--- docs/ref/joystick.html	(revision 1345)
+++ docs/ref/joystick.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/cursors.html
===================================================================
--- docs/ref/cursors.html	(revision 1345)
+++ docs/ref/cursors.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/cdrom.html
===================================================================
--- docs/ref/cdrom.html	(revision 1345)
+++ docs/ref/cdrom.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/display.html
===================================================================
--- docs/ref/display.html	(revision 1345)
+++ docs/ref/display.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/font.html
===================================================================
--- docs/ref/font.html	(revision 1345)
+++ docs/ref/font.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/sprite.html
===================================================================
--- docs/ref/sprite.html	(revision 1345)
+++ docs/ref/sprite.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/index.html
===================================================================
--- docs/ref/index.html	(revision 1345)
+++ docs/ref/index.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
@@ -179,6 +180,33 @@
 <li><a href="font.html#pygame.font.quit">pygame.font.quit</a> - <font size=-1>uninitialize the font module</font></li>
 <li><a href="font.html#pygame.font.SysFont">pygame.font.SysFont</a> - <font size=-1>create a Font object from the system fonts</font></li>
 </ul>
+<li><a href="gfx.html#pygame.gfx">pygame.gfx</a> - <font size=-1>pygame module for drawing shapes</font></li>
+<ul>
+<li><a href="gfx.html#pygame.gfx.aacircle">pygame.gfx.aacircle</a> - <font size=-1>draw an antialiased circle</font></li>
+<li><a href="gfx.html#pygame.gfx.aaellipse">pygame.gfx.aaellipse</a> - <font size=-1>draw an antialiased ellipse</font></li>
+<li><a href="gfx.html#pygame.gfx.aaline">pygame.gfx.aaline</a> - <font size=-1>draw an antialiased line</font></li>
+<li><a href="gfx.html#pygame.gfx.aapolygon">pygame.gfx.aapolygon</a> - <font size=-1>draw an antialiased polygon</font></li>
+<li><a href="gfx.html#pygame.gfx.aatrigon">pygame.gfx.aatrigon</a> - <font size=-1>draw an antialiased trigon</font></li>
+<li><a href="gfx.html#pygame.gfx.arc">pygame.gfx.arc</a> - <font size=-1>draw an arc</font></li>
+<li><a href="gfx.html#pygame.gfx.bezier">pygame.gfx.bezier</a> - <font size=-1>draw a bezier</font></li>
+<li><a href="gfx.html#pygame.gfx.box">pygame.gfx.box</a> - <font size=-1>draw a box</font></li>
+<li><a href="gfx.html#pygame.gfx.circle">pygame.gfx.circle</a> - <font size=-1>draw a circle</font></li>
+<li><a href="gfx.html#pygame.gfx.ellipse">pygame.gfx.ellipse</a> - <font size=-1>draw an ellipse</font></li>
+<li><a href="gfx.html#pygame.gfx.filled_circle">pygame.gfx.filled_circle</a> - <font size=-1>draw a filled circle</font></li>
+<li><a href="gfx.html#pygame.gfx.filled_ellipse">pygame.gfx.filled_ellipse</a> - <font size=-1>draw a filled ellipse</font></li>
+<li><a href="gfx.html#pygame.gfx.filled_pie">pygame.gfx.filled_pie</a> - <font size=-1>draw a filled pie</font></li>
+<li><a href="gfx.html#pygame.gfx.filled_polygon">pygame.gfx.filled_polygon</a> - <font size=-1>draw a filled polygon</font></li>
+<li><a href="gfx.html#pygame.gfx.filled_trigon">pygame.gfx.filled_trigon</a> - <font size=-1>draw a filled trigon</font></li>
+<li><a href="gfx.html#pygame.gfx.horizontal_line">pygame.gfx.horizontal_line</a> - <font size=-1>draw a horizontal line</font></li>
+<li><a href="gfx.html#pygame.gfx.line">pygame.gfx.line</a> - <font size=-1>draw a line</font></li>
+<li><a href="gfx.html#pygame.gfx.pie">pygame.gfx.pie</a> - <font size=-1>draw a pie</font></li>
+<li><a href="gfx.html#pygame.gfx.pixel">pygame.gfx.pixel</a> - <font size=-1>draw a pixel</font></li>
+<li><a href="gfx.html#pygame.gfx.polygon">pygame.gfx.polygon</a> - <font size=-1>draw a polygon</font></li>
+<li><a href="gfx.html#pygame.gfx.rectangle">pygame.gfx.rectangle</a> - <font size=-1>draw a rectangle</font></li>
+<li><a href="gfx.html#pygame.gfx.textured_polygon">pygame.gfx.textured_polygon</a> - <font size=-1>draw a textured polygon</font></li>
+<li><a href="gfx.html#pygame.gfx.trigon">pygame.gfx.trigon</a> - <font size=-1>draw a trigon</font></li>
+<li><a href="gfx.html#pygame.gfx.vertical_line">pygame.gfx.vertical_line</a> - <font size=-1>draw a vertical line</font></li>
+</ul>
 <li><a href="image.html#pygame.image">pygame.image</a> - <font size=-1>pygame module for image transfer</font></li>
 <ul>
 <li><a href="image.html#pygame.image.frombuffer">pygame.image.frombuffer</a> - <font size=-1>create a new Surface that shares data inside a string buffer</font></li>
Index: docs/ref/scrap.html
===================================================================
--- docs/ref/scrap.html	(revision 1345)
+++ docs/ref/scrap.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: docs/ref/transform.html
===================================================================
--- docs/ref/transform.html	(revision 1345)
+++ docs/ref/transform.html	(working copy)
@@ -21,6 +21,7 @@
 <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="gfx.html">Gfx</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;
Index: config_unix.py
===================================================================
--- config_unix.py	(revision 1345)
+++ config_unix.py	(working copy)
@@ -135,6 +135,7 @@
         Dependency('FONT', 'SDL_ttf.h', 'libSDL_ttf.so', ['SDL_ttf']),
         Dependency('IMAGE', 'SDL_image.h', 'libSDL_image.so', ['SDL_image']),
         Dependency('MIXER', 'SDL_mixer.h', 'libSDL_mixer.so', ['SDL_mixer']),
+        Dependency('GFX', 'SDL_gfxPrimitives.h', 'libSDL_gfx.so', ['SDL_gfx']),
         DependencyProg('SMPEG', 'SMPEG_CONFIG', 'smpeg-config', '0.4.3', ['smpeg']),
         Dependency('PNG', 'png.h', 'libpng', ['png']),
         Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']),
Index: Setup.in
===================================================================
--- Setup.in	(revision 1345)
+++ Setup.in	(working copy)
@@ -11,6 +11,7 @@
 FONT = -lSDL_ttf
 IMAGE = -lSDL_image
 MIXER = -lSDL_mixer
+GFX = -lSDL_gfx
 SMPEG = -lsmpeg
 PNG = -lpng
 JPEG = -ljpeg
@@ -19,6 +20,7 @@
 COPYLIB_FONT -lSDL_ttf -Lprebuilt/lib/SDL_ttf.dll
 COPYLIB_IMAGE -lSDL_image -Lprebuilt/lib/SDL_image.dll
 COPYLIB_MIXER -lSDL_mixer -Lprebuilt/lib/SDL_mixer.dll
+COPYLIB_GFX -lSDL_gfx -Lprebuilt/lib/SDL_gfx.dll
 COPYLIB_SMPEG -lsmpeg -Lprebuilt/lib/smpeg.dll
 COPYLIB_TIFF -ltiff -Lprebuilt/lib/libtiff.dll
 COPYLIB_PNG -lpng -Lprebuilt/lib/libpng13.dll
@@ -44,6 +46,7 @@
 _numericsndarray src/_numericsndarray.c $(SDL) $(MIXER) $(DEBUG)
 movie src/movie.c $(SDL) $(SMPEG) $(DEBUG)
 scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG)
+gfx src/gfx.c $(SDL) $(GFX) $(DEBUG)
 
 #experimental new movie movie. requires libavcodec and libavformat.
 #add any necessary compile flags to this line and uncomment.
Index: lib/__init__.py
===================================================================
--- lib/__init__.py	(revision 1345)
+++ lib/__init__.py	(working copy)
@@ -185,6 +185,9 @@
 try: import pygame.fastevent
 except (ImportError,IOError), msg:fastevent=MissingModule("fastevent", msg, 0)
 
+try: import pygame.gfx
+except (ImportError,IOError), msg:gfx=MissingModule("gfx", msg, 1)
+
 #there's also a couple "internal" modules not needed
 #by users, but putting them here helps "dependency finder"
 #programs get everything they need (like py2exe)
