[cairo-commit] pycairo/cairo cairogtkmodule.c, 1.18, 1.19 cairomodule.c, 1.30, 1.31 cairosvgmodule.c, 1.3, 1.4 pycairo-context.c, 1.46, 1.47 pycairo-font.c, 1.13, 1.14 pycairo-matrix.c, 1.14, 1.15 pycairo-misc.h, 1.1, 1.2 pycairo-path.c, NONE, 1.1 pycairo-pattern.c, 1.17, 1.18 pycairo-private.h, 1.20, 1.21 pycairo-surface.c, 1.34, 1.35 pycairo.h, 1.27, 1.28 pycairosvg-context.c, 1.4, 1.5 pycairosvg-private.h, 1.2, 1.3 Makefile.am, 1.11, 1.12

Steve Chaplin commit at pdx.freedesktop.org
Mon May 9 02:12:33 PDT 2005


Committed by: stevech1097

Update of /cvs/cairo/pycairo/cairo
In directory gabe:/tmp/cvs-serv16365/cairo

Modified Files:
	cairogtkmodule.c cairomodule.c cairosvgmodule.c 
	pycairo-context.c pycairo-font.c pycairo-matrix.c 
	pycairo-misc.h pycairo-pattern.c pycairo-private.h 
	pycairo-surface.c pycairo.h pycairosvg-context.c 
	pycairosvg-private.h Makefile.am 
Added Files:
	pycairo-path.c 
Log Message:
SC

Index: cairogtkmodule.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/cairogtkmodule.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- cairogtkmodule.c	9 May 2005 00:52:46 -0000	1.18
+++ cairogtkmodule.c	9 May 2005 09:12:31 -0000	1.19
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 James Henstridge
+ * Copyright © 2003-2005 James Henstridge
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,9 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *                 Steve Chaplin
  */
 
 #ifdef HAVE_CONFIG_H
@@ -79,7 +76,7 @@
     if (!surface)
 	return PyErr_NoMemory();
 
-    py_surface = PyCairoSurface_FromSurface(surface, (PyObject *)py_pixbuf);
+    py_surface = PycairoSurface_FromSurface(surface, (PyObject *)py_pixbuf);
     if (!py_surface)
 	cairo_surface_destroy(surface);
     return py_surface;
@@ -92,10 +89,8 @@
 _gdk_drawable_create_cairo_context (GdkDrawable *drawable)
 {
     cairo_t *cr = NULL;
-    cairo_surface_t *surface;
-    GdkVisual *visual;
-    
-    visual = gdk_drawable_get_visual (drawable);
+    cairo_surface_t *surface = NULL;
+    GdkVisual *visual = gdk_drawable_get_visual (drawable);
 
     if (GDK_IS_WINDOW (drawable))
 	surface = cairo_xlib_surface_create_for_window_with_visual (GDK_WINDOW_XDISPLAY (drawable),
@@ -110,17 +105,14 @@
 							GDK_PIXMAP_XID (drawable),
 							CAIRO_FORMAT_A1);
     else
-	{
-	    g_warning ("Using Cairo rendering requires the drawable argument to\n"
-		       "have a specified colormap. All windows have a colormap,\n"
-		       "however, pixmaps only have colormap by default if they\n"
-		       "were created with a non-NULL window argument. Otherwise\n"
-		       "a colormap must be set on them with gdk_drawable_set_colormap");
-	    return NULL;
-	}
+	g_warning ("Using Cairo rendering requires the drawable argument to\n"
+		   "have a specified colormap. All windows have a colormap,\n"
+		   "however, pixmaps only have colormap by default if they\n"
+		   "were created with a non-NULL window argument. Otherwise\n"
+		   "a colormap must be set on them with gdk_drawable_set_colormap");
     if (surface) {
 	cr = cairo_create (surface);
-	cairo_surface_destroy(surface);
+	cairo_surface_destroy (surface);
     }
     return cr;
 }
@@ -143,7 +135,7 @@
 	return NULL;
     }
 
-    c = PyCairoContext_FromContext(cr, (PyObject *)py_drawable);
+    c = PycairoContext_FromContext(cr, (PyObject *)py_drawable);
     if (!c)
 	cairo_destroy(cr);
     return c;
@@ -165,7 +157,7 @@
     if (!mod)
 	return;
 
-    PyCairo_IMPORT;
+    Pycairo_IMPORT;
 
     /* strange way to access the pygtk C API, why not PyGTK_IMPORT ? */
     init_pygtk();

Index: cairomodule.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/cairomodule.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- cairomodule.c	9 May 2005 00:52:46 -0000	1.30
+++ cairomodule.c	9 May 2005 09:12:31 -0000	1.31
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 James Henstridge
+ * Copyright © 2003-2005 James Henstridge
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,9 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *                 Maarten Breddels
  */
 
 #ifdef HAVE_CONFIG_H
@@ -99,20 +96,22 @@
 }
 
 
-/* C API.  Clients get at this via PyCairo_IMPORT, defined in pycairo.h.
+/* C API.  Clients get at this via Pycairo_IMPORT, defined in pycairo.h.
  */
-static PyCairo_CAPI_t CAPI = {
-    &PyCairoContext_Type,  
-    &PyCairoFontFace_Type, 
-    &PyCairoMatrix_Type,   
-    &PyCairoPattern_Type,  
-    &PyCairoSurface_Type,  
+static Pycairo_CAPI_t CAPI = {
+    &PycairoContext_Type,  
+    &PycairoFontFace_Type, 
+    &PycairoMatrix_Type,   
+    &PycairoPath_Type,  
+    &PycairoPattern_Type,  
+    &PycairoSurface_Type,  
 
-    PyCairoContext_FromContext,
-    PyCairoFontFace_FromFontFace,
-    PyCairoMatrix_FromMatrix,
-    PyCairoPattern_FromPattern,
-    PyCairoSurface_FromSurface,
+    PycairoContext_FromContext,
+    PycairoFontFace_FromFontFace,
+    PycairoMatrix_FromMatrix,
+    PycairoPath_FromPath,
+    PycairoPattern_FromPattern,
+    PycairoSurface_FromSurface,
 
     pycairo_check_status,
 };
@@ -122,40 +121,44 @@
 {
     PyObject *m;
 
-    if (PyType_Ready(&PyCairoContext_Type) < 0)
+    if (PyType_Ready(&PycairoContext_Type) < 0)
         return;
-    if (PyType_Ready(&PyCairoFontFace_Type) < 0)
+    if (PyType_Ready(&PycairoFontFace_Type) < 0)
         return;
-    if (PyType_Ready(&PyCairoMatrix_Type) < 0)
+    if (PyType_Ready(&PycairoMatrix_Type) < 0)
         return;
-    if (PyType_Ready(&PyCairoPattern_Type) < 0)
+    if (PyType_Ready(&PycairoPath_Type) < 0)
+        return;
+    if (PyType_Ready(&PycairoPattern_Type) < 0)
         return;
 
-    if (PyType_Ready(&PyCairoSurface_Type) < 0)
+    if (PyType_Ready(&PycairoSurface_Type) < 0)
         return;
-    if (PyType_Ready(&PyCairoImageSurface_Type) < 0)
+    if (PyType_Ready(&PycairoImageSurface_Type) < 0)
         return;
-    if (PyType_Ready(&PyCairoPDFSurface_Type) < 0)
+    if (PyType_Ready(&PycairoPDFSurface_Type) < 0)
         return;
 
     m = Py_InitModule("cairo._cairo", NULL);
 
-    Py_INCREF(&PyCairoContext_Type);
-    PyModule_AddObject(m, "Context", (PyObject *)&PyCairoContext_Type);
-    Py_INCREF(&PyCairoFontFace_Type);
-    PyModule_AddObject(m, "FontFace",(PyObject *)&PyCairoFontFace_Type);
-    Py_INCREF(&PyCairoMatrix_Type);
-    PyModule_AddObject(m, "Matrix",  (PyObject *)&PyCairoMatrix_Type);
-    Py_INCREF(&PyCairoPattern_Type);
-    PyModule_AddObject(m, "Pattern", (PyObject *)&PyCairoPattern_Type);
+    Py_INCREF(&PycairoContext_Type);
+    PyModule_AddObject(m, "Context", (PyObject *)&PycairoContext_Type);
+    Py_INCREF(&PycairoFontFace_Type);
+    PyModule_AddObject(m, "FontFace",(PyObject *)&PycairoFontFace_Type);
+    Py_INCREF(&PycairoMatrix_Type);
+    PyModule_AddObject(m, "Matrix",  (PyObject *)&PycairoMatrix_Type);
+    Py_INCREF(&PycairoPath_Type);
+    PyModule_AddObject(m, "Path", (PyObject *)&PycairoPath_Type);
+    Py_INCREF(&PycairoPattern_Type);
+    PyModule_AddObject(m, "Pattern", (PyObject *)&PycairoPattern_Type);
 
-    Py_INCREF(&PyCairoSurface_Type);
-    PyModule_AddObject(m, "Surface", (PyObject *)&PyCairoSurface_Type);
-    Py_INCREF(&PyCairoImageSurface_Type);
+    Py_INCREF(&PycairoSurface_Type);
+    PyModule_AddObject(m, "Surface", (PyObject *)&PycairoSurface_Type);
+    Py_INCREF(&PycairoImageSurface_Type);
     PyModule_AddObject(m, "ImageSurface", 
-		       (PyObject *)&PyCairoImageSurface_Type);
-    Py_INCREF(&PyCairoPDFSurface_Type);
-    PyModule_AddObject(m, "PDFSurface", (PyObject *)&PyCairoPDFSurface_Type);
+		       (PyObject *)&PycairoImageSurface_Type);
+    Py_INCREF(&PycairoPDFSurface_Type);
+    PyModule_AddObject(m, "PDFSurface", (PyObject *)&PycairoPDFSurface_Type);
 
     PyModule_AddObject(m, "pycairo_CAPI", PyCObject_FromVoidPtr(&CAPI, NULL));
 

Index: cairosvgmodule.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/cairosvgmodule.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cairosvgmodule.c	6 May 2005 13:46:13 -0000	1.3
+++ cairosvgmodule.c	9 May 2005 09:12:31 -0000	1.4
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 Steve Chaplin
+ * Copyright © 2003-2005 Steve Chaplin
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,9 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *                 Steve Chaplin
  */
 
 #include <Python.h>
@@ -64,15 +61,15 @@
 {
     PyObject* mod;
 
-    if (PyType_Ready(&PyCairoSVGContext_Type) < 0)
+    if (PyType_Ready(&PycairoSVGContext_Type) < 0)
         return;
 
     mod = Py_InitModule3 ("cairo.svg", svg_functions, svg_doc);
     if (mod == NULL)
 	return;
 
-    PyCairo_IMPORT;
+    Pycairo_IMPORT;
 
-    Py_INCREF(&PyCairoSVGContext_Type);
-    PyModule_AddObject(mod, "Context", (PyObject *)&PyCairoSVGContext_Type);
+    Py_INCREF(&PycairoSVGContext_Type);
+    PyModule_AddObject(mod, "Context", (PyObject *)&PycairoSVGContext_Type);
 }

Index: pycairo-context.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-context.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- pycairo-context.c	9 May 2005 00:52:46 -0000	1.46
+++ pycairo-context.c	9 May 2005 09:12:31 -0000	1.47
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 James Henstridge
+ * Copyright © 2003-2005 James Henstridge
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,10 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *                 Steve Chaplin
- *                 Maarten Breddels
  */
 
 #ifdef HAVE_CONFIG_H
@@ -37,8 +33,8 @@
 #endif
 #include "pycairo-private.h"
 
-/* PyCairoContext_FromContext
- * Create a new PyCairoContext from a cairo_t
+/* PycairoContext_FromContext
+ * Create a new PycairoContext from a cairo_t
  * Return value: New reference (NULL on failure)
  *
  * base - the base object used to create the context, or NULL.
@@ -46,10 +42,10 @@
  *        is being used
  */
 PyObject *
-PyCairoContext_FromContext(cairo_t *ctx, PyObject *base)
+PycairoContext_FromContext(cairo_t *ctx, PyObject *base)
 {
-    PyCairoContext *c = (PyCairoContext *)PyCairoContext_Type.tp_new
-	(&PyCairoContext_Type, NULL, NULL);
+    PycairoContext *c = (PycairoContext *)PycairoContext_Type.tp_new
+	(&PycairoContext_Type, NULL, NULL);
     if (c) {
 	c->ctx = ctx;
 	Py_XINCREF(base);
@@ -59,7 +55,7 @@
 }
 
 static void
-pycairo_dealloc(PyCairoContext *c)
+pycairo_dealloc(PycairoContext *c)
 {
 #ifdef DEBUG
     printf("context_dealloc start\n");
@@ -83,12 +79,12 @@
 }
 
 static int
-pycairo_init(PyCairoContext *c, PyObject *args, PyObject *kwds)
+pycairo_init(PycairoContext *c, PyObject *args, PyObject *kwds)
 {
-    PyCairoSurface *s;
+    PycairoSurface *s;
 
     if (!PyArg_ParseTuple(args, "O!:Context.__init__", 
-			  &PyCairoSurface_Type, &s))
+			  &PycairoSurface_Type, &s))
 	return -1;
 
     c->ctx = cairo_create(s->surface);
@@ -105,7 +101,7 @@
 }
 
 static PyObject *
-pycairo_arc(PyCairoContext *c, PyObject *args)
+pycairo_arc(PycairoContext *c, PyObject *args)
 {
     double xc, yc, radius, angle1, angle2;
 
@@ -120,7 +116,7 @@
 }
 
 static PyObject *
-pycairo_arc_negative(PyCairoContext *c, PyObject *args)
+pycairo_arc_negative(PycairoContext *c, PyObject *args)
 {
     double xc, yc, radius, angle1, angle2;
 
@@ -135,7 +131,7 @@
 }
 
 static PyObject *
-pycairo_clip(PyCairoContext *c)
+pycairo_clip(PycairoContext *c)
 {
     cairo_clip(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -144,7 +140,7 @@
 }
 
 static PyObject *
-pycairo_clip_preserve(PyCairoContext *c)
+pycairo_clip_preserve(PycairoContext *c)
 {
     cairo_clip_preserve(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -153,7 +149,7 @@
 }
 
 static PyObject *
-pycairo_close_path(PyCairoContext *c)
+pycairo_close_path(PycairoContext *c)
 {
     cairo_close_path(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -162,7 +158,7 @@
 }
 
 static PyObject *
-pycairo_copy_page(PyCairoContext *c)
+pycairo_copy_page(PycairoContext *c)
 {
     cairo_copy_page(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -171,7 +167,21 @@
 }
 
 static PyObject *
-pycairo_curve_to(PyCairoContext *c, PyObject *args)
+pycairo_copy_path(PycairoContext *c)
+{
+    PyObject *p;
+    cairo_path_t *path = cairo_copy_path(c->ctx);
+    if (pycairo_check_status(cairo_status(c->ctx)))
+	return NULL;
+
+    p = PycairoPath_FromPath(path);
+    if (!p)
+	cairo_path_destroy(path);
+    return p;
+}
+
+static PyObject *
+pycairo_curve_to(PycairoContext *c, PyObject *args)
 {
     double x1, y1, x2, y2, x3, y3;
 
@@ -186,7 +196,7 @@
 }
 
 static PyObject *
-pycairo_device_to_user(PyCairoContext *c, PyObject *args)
+pycairo_device_to_user(PycairoContext *c, PyObject *args)
 {
     double x, y;
 
@@ -200,7 +210,7 @@
 }
 
 static PyObject *
-pycairo_device_to_user_distance(PyCairoContext *c, PyObject *args)
+pycairo_device_to_user_distance(PycairoContext *c, PyObject *args)
 {
     double dx, dy;
 
@@ -215,7 +225,7 @@
 }
 
 static PyObject *
-pycairo_fill(PyCairoContext *c)
+pycairo_fill(PycairoContext *c)
 {
     cairo_fill(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -224,7 +234,7 @@
 }
 
 static PyObject *
-pycairo_fill_preserve(PyCairoContext *c)
+pycairo_fill_preserve(PycairoContext *c)
 {
     cairo_fill_preserve(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -233,7 +243,7 @@
 }
 
 static PyObject *
-pycairo_fill_extents(PyCairoContext *c)
+pycairo_fill_extents(PycairoContext *c)
 {
     double x1, y1, x2, y2;
     cairo_fill_extents(c->ctx, &x1, &y1, &x2, &y2);
@@ -243,7 +253,7 @@
 }
 
 static PyObject *
-pycairo_font_extents(PyCairoContext *c)
+pycairo_font_extents(PycairoContext *c)
 {
     cairo_font_extents_t extents;
 
@@ -256,7 +266,7 @@
 }
 
 static PyObject *
-pycairo_get_current_point(PyCairoContext *c)
+pycairo_get_current_point(PycairoContext *c)
 {
     double x, y;
 
@@ -265,13 +275,13 @@
 }
 
 static PyObject *
-pycairo_get_fill_rule(PyCairoContext *c)
+pycairo_get_fill_rule(PycairoContext *c)
 {
     return PyInt_FromLong(cairo_get_fill_rule(c->ctx));
 }
 
 static PyObject *
-pycairo_get_font_face(PyCairoContext *c)
+pycairo_get_font_face(PycairoContext *c)
 {
     PyObject *f;
     cairo_font_face_t *font_face;
@@ -281,60 +291,60 @@
 	pycairo_check_status(cairo_status(c->ctx));
 	return NULL;
     }
-    f = PyCairoFontFace_FromFontFace(font_face);
+    f = PycairoFontFace_FromFontFace(font_face);
     if (f)
 	cairo_font_face_reference(font_face);
     return f;
 }
 
 static PyObject *
-pycairo_get_font_matrix(PyCairoContext *c)
+pycairo_get_font_matrix(PycairoContext *c)
 {
     cairo_matrix_t mx1, *mx2;
     mx1 = cairo_get_font_matrix (c->ctx, mx2); /* cairo does not use mx2! */
-    return PyCairoMatrix_FromMatrix (&mx1);
+    return PycairoMatrix_FromMatrix (&mx1);
 }
 
 static PyObject *
-pycairo_get_line_cap(PyCairoContext *c)
+pycairo_get_line_cap(PycairoContext *c)
 {
     return PyInt_FromLong(cairo_get_line_cap(c->ctx));
 }
 
 static PyObject *
-pycairo_get_line_join(PyCairoContext *c)
+pycairo_get_line_join(PycairoContext *c)
 {
     return PyInt_FromLong(cairo_get_line_join(c->ctx));
 }
 
 static PyObject *
-pycairo_get_line_width(PyCairoContext *c)
+pycairo_get_line_width(PycairoContext *c)
 {
     return PyFloat_FromDouble(cairo_get_line_width(c->ctx));
 }
 
 static PyObject *
-pycairo_get_matrix(PyCairoContext *c)
+pycairo_get_matrix(PycairoContext *c)
 {
     cairo_matrix_t matrix;
     cairo_get_matrix (c->ctx, &matrix);
-    return PyCairoMatrix_FromMatrix (&matrix);
+    return PycairoMatrix_FromMatrix (&matrix);
 }
 
 static PyObject *
-pycairo_get_miter_limit(PyCairoContext *c)
+pycairo_get_miter_limit(PycairoContext *c)
 {
     return PyFloat_FromDouble(cairo_get_miter_limit(c->ctx));
 }
 
 static PyObject *
-pycairo_get_operator(PyCairoContext *c)
+pycairo_get_operator(PycairoContext *c)
 {
     return PyInt_FromLong(cairo_get_operator(c->ctx));
 }
 
 static PyObject *
-pycairo_get_source(PyCairoContext *c)
+pycairo_get_source(PycairoContext *c)
 {
     PyObject *p;
     cairo_pattern_t *pattern = cairo_get_source(c->ctx);
@@ -342,7 +352,7 @@
     if (!pattern)
 	return PyErr_NoMemory();
 
-    p = PyCairoPattern_FromPattern(pattern);
+    p = PycairoPattern_FromPattern(pattern);
     if (p)
 	cairo_pattern_reference(pattern);
     return p;
@@ -350,7 +360,7 @@
 }
 
 static PyObject *
-pycairo_get_target(PyCairoContext *c)
+pycairo_get_target(PycairoContext *c)
 {
     PyObject *s;
     cairo_surface_t *surface = cairo_get_target(c->ctx);
@@ -359,20 +369,20 @@
 	return NULL;
     }
 
-    s = PyCairoSurface_FromSurface(surface, NULL);
+    s = PycairoSurface_FromSurface(surface, NULL);
     if (s)
 	cairo_surface_reference(surface);
     return s;
 }
 
 static PyObject *
-pycairo_get_tolerance(PyCairoContext *c)
+pycairo_get_tolerance(PycairoContext *c)
 {
     return PyFloat_FromDouble(cairo_get_tolerance(c->ctx));
 }
 
 static PyObject *
-pycairo_identity_matrix(PyCairoContext *c)
+pycairo_identity_matrix(PycairoContext *c)
 {
     cairo_identity_matrix(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -381,7 +391,7 @@
 }
 
 static PyObject *
-pycairo_in_fill(PyCairoContext *c, PyObject *args)
+pycairo_in_fill(PycairoContext *c, PyObject *args)
 {
     double x, y;
     PyObject *result;
@@ -397,7 +407,7 @@
 }
 
 static PyObject *
-pycairo_in_stroke(PyCairoContext *c, PyObject *args)
+pycairo_in_stroke(PycairoContext *c, PyObject *args)
 {
     double x, y;
     PyObject *result;
@@ -413,7 +423,7 @@
 }
 
 static PyObject *
-pycairo_line_to(PyCairoContext *c, PyObject *args)
+pycairo_line_to(PycairoContext *c, PyObject *args)
 {
     double x, y;
 
@@ -427,11 +437,11 @@
 }
 
 static PyObject *
-pycairo_mask(PyCairoContext *c, PyObject *args)
+pycairo_mask(PycairoContext *c, PyObject *args)
 {
-    PyCairoPattern *p;
+    PycairoPattern *p;
 
-    if (!PyArg_ParseTuple(args, "O!:Context.mask", &PyCairoPattern_Type, &p))
+    if (!PyArg_ParseTuple(args, "O!:Context.mask", &PycairoPattern_Type, &p))
 	return NULL;
 
     cairo_mask(c->ctx, p->pattern);
@@ -441,13 +451,13 @@
 }
 
 static PyObject *
-pycairo_mask_surface(PyCairoContext *c, PyObject *args)
+pycairo_mask_surface(PycairoContext *c, PyObject *args)
 {
-    PyCairoSurface *s;
+    PycairoSurface *s;
     double surface_x, surface_y;
 
     if (!PyArg_ParseTuple(args, "O!dd:Context.mask_surface", 
-			  &PyCairoSurface_Type, &s, &surface_x, &surface_y))
+			  &PycairoSurface_Type, &s, &surface_x, &surface_y))
 	return NULL;
 
     cairo_mask_surface(c->ctx, s->surface, surface_x, surface_y);
@@ -457,7 +467,7 @@
 }
 
 static PyObject *
-pycairo_move_to(PyCairoContext *c, PyObject *args)
+pycairo_move_to(PycairoContext *c, PyObject *args)
 {
     double x, y;
 
@@ -471,7 +481,7 @@
 }
 
 static PyObject *
-pycairo_new_path(PyCairoContext *c)
+pycairo_new_path(PycairoContext *c)
 {
     cairo_new_path(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -480,7 +490,7 @@
 }
 
 static PyObject *
-pycairo_paint(PyCairoContext *c)
+pycairo_paint(PycairoContext *c)
 {
     cairo_paint(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -489,7 +499,7 @@
 }
 
 static PyObject *
-pycairo_paint_with_alpha(PyCairoContext *c, PyObject *args)
+pycairo_paint_with_alpha(PycairoContext *c, PyObject *args)
 {
     double alpha;
 
@@ -503,7 +513,7 @@
 }
 
 static PyObject *
-pycairo_rectangle(PyCairoContext *c, PyObject *args)
+pycairo_rectangle(PycairoContext *c, PyObject *args)
 {
     double x, y, width, height;
 
@@ -518,7 +528,7 @@
 }
 
 static PyObject *
-pycairo_rel_curve_to(PyCairoContext *c, PyObject *args)
+pycairo_rel_curve_to(PycairoContext *c, PyObject *args)
 {
     double dx1, dy1, dx2, dy2, dx3, dy3;
 
@@ -533,7 +543,7 @@
 }
 
 static PyObject *
-pycairo_rel_line_to(PyCairoContext *c, PyObject *args)
+pycairo_rel_line_to(PycairoContext *c, PyObject *args)
 {
     double dx, dy;
 
@@ -547,7 +557,7 @@
 }
 
 static PyObject *
-pycairo_rel_move_to(PyCairoContext *c, PyObject *args)
+pycairo_rel_move_to(PycairoContext *c, PyObject *args)
 {
     double dx, dy;
 
@@ -561,7 +571,7 @@
 }
 
 static PyObject *
-pycairo_reset_clip(PyCairoContext *c)
+pycairo_reset_clip(PycairoContext *c)
 {
     cairo_reset_clip(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -570,7 +580,7 @@
 }
 
 static PyObject *
-pycairo_restore(PyCairoContext *c)
+pycairo_restore(PycairoContext *c)
 {
     cairo_restore(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -579,7 +589,7 @@
 }
 
 static PyObject *
-pycairo_rotate(PyCairoContext *c, PyObject *args)
+pycairo_rotate(PycairoContext *c, PyObject *args)
 {
     double angle;
 
@@ -593,7 +603,7 @@
 }
 
 static PyObject *
-pycairo_save(PyCairoContext *c)
+pycairo_save(PycairoContext *c)
 {
     cairo_save(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -602,7 +612,7 @@
 }
 
 static PyObject *
-pycairo_scale(PyCairoContext *c, PyObject *args)
+pycairo_scale(PycairoContext *c, PyObject *args)
 {
     double sx, sy;
 
@@ -616,7 +626,7 @@
 }
 
 static PyObject *
-pycairo_select_font_face(PyCairoContext *c, PyObject *args)
+pycairo_select_font_face(PycairoContext *c, PyObject *args)
 {
     const char *family;
     cairo_font_slant_t slant = CAIRO_FONT_SLANT_NORMAL;
@@ -633,7 +643,7 @@
 }
 
 static PyObject *
-pycairo_set_dash(PyCairoContext *c, PyObject *args)
+pycairo_set_dash(PycairoContext *c, PyObject *args)
 {
     double *dashes, offset = 0;
     int ndash, i;
@@ -666,7 +676,7 @@
 }
 
 static PyObject *
-pycairo_set_fill_rule(PyCairoContext *c, PyObject *args)
+pycairo_set_fill_rule(PycairoContext *c, PyObject *args)
 {
     cairo_fill_rule_t fill_rule;
 
@@ -680,12 +690,12 @@
 }
 
 static PyObject *
-pycairo_set_font_matrix(PyCairoContext *c, PyObject *args)
+pycairo_set_font_matrix(PycairoContext *c, PyObject *args)
 {
-    PyCairoMatrix *matrix;
+    PycairoMatrix *matrix;
 
     if (!PyArg_ParseTuple(args, "O!:Context.set_font_matrix",
-			  &PyCairoMatrix_Type, &matrix))
+			  &PycairoMatrix_Type, &matrix))
 	return NULL;
 
     cairo_set_font_matrix(c->ctx, &matrix->matrix);
@@ -695,7 +705,7 @@
 }
 
 static PyObject *
-pycairo_set_font_size(PyCairoContext *c, PyObject *args)
+pycairo_set_font_size(PycairoContext *c, PyObject *args)
 {
     double size;
 
@@ -709,13 +719,13 @@
 }
 
 static PyObject *
-pycairo_set_font_face(PyCairoContext *c, PyObject *args)
+pycairo_set_font_face(PycairoContext *c, PyObject *args)
 {
-    PyCairoFontFace *ff;
+    PycairoFontFace *ff;
     /* TODO: font_face or None (NULL) should be allowed */
 
     if (!PyArg_ParseTuple(args, "O!:Context.set_font_face",
-			  &PyCairoFontFace_Type, &ff))
+			  &PycairoFontFace_Type, &ff))
 	return NULL;
 
     cairo_set_font_face(c->ctx, ff->font_face);
@@ -725,7 +735,7 @@
 }
 
 static PyObject *
-pycairo_set_line_cap(PyCairoContext *c, PyObject *args)
+pycairo_set_line_cap(PycairoContext *c, PyObject *args)
 {
     cairo_line_cap_t line_cap;
 
@@ -739,7 +749,7 @@
 }
 
 static PyObject *
-pycairo_set_line_join(PyCairoContext *c, PyObject *args)
+pycairo_set_line_join(PycairoContext *c, PyObject *args)
 {
     cairo_line_join_t line_join;
 
@@ -753,7 +763,7 @@
 }
 
 static PyObject *
-pycairo_set_line_width(PyCairoContext *c, PyObject *args)
+pycairo_set_line_width(PycairoContext *c, PyObject *args)
 {
     double width;
 
@@ -767,12 +777,12 @@
 }
 
 static PyObject *
-pycairo_set_matrix(PyCairoContext *c, PyObject *args)
+pycairo_set_matrix(PycairoContext *c, PyObject *args)
 {
-    PyCairoMatrix *matrix;
+    PycairoMatrix *matrix;
 
     if (!PyArg_ParseTuple(args, "O!:Context.set_matrix",
-			   &PyCairoMatrix_Type, &matrix))
+			   &PycairoMatrix_Type, &matrix))
 	return NULL;
 
     cairo_set_matrix(c->ctx, &matrix->matrix);
@@ -782,7 +792,7 @@
 }
 
 static PyObject *
-pycairo_set_miter_limit(PyCairoContext *c, PyObject *args)
+pycairo_set_miter_limit(PycairoContext *c, PyObject *args)
 {
     double limit;
 
@@ -796,7 +806,7 @@
 }
 
 static PyObject *
-pycairo_set_operator(PyCairoContext *c, PyObject *args)
+pycairo_set_operator(PycairoContext *c, PyObject *args)
 {
     cairo_operator_t op;
 
@@ -810,12 +820,12 @@
 }
 
 static PyObject *
-pycairo_set_source(PyCairoContext *c, PyObject *args)
+pycairo_set_source(PycairoContext *c, PyObject *args)
 {
-    PyCairoPattern *p;
+    PycairoPattern *p;
 
     if (!PyArg_ParseTuple(args, "O!:Context.set_source",
-			  &PyCairoPattern_Type, &p))
+			  &PycairoPattern_Type, &p))
 	return NULL;
 
     cairo_set_source(c->ctx, p->pattern);
@@ -825,7 +835,7 @@
 }
 
 static PyObject *
-pycairo_set_source_rgb(PyCairoContext *c, PyObject *args)
+pycairo_set_source_rgb(PycairoContext *c, PyObject *args)
 {
     double red, green, blue;
 
@@ -840,7 +850,7 @@
 }
 
 static PyObject *
-pycairo_set_source_rgba(PyCairoContext *c, PyObject *args)
+pycairo_set_source_rgba(PycairoContext *c, PyObject *args)
 {
     double red, green, blue, alpha;
 
@@ -855,13 +865,13 @@
 }
 
 static PyObject *
-pycairo_set_source_surface(PyCairoContext *c, PyObject *args)
+pycairo_set_source_surface(PycairoContext *c, PyObject *args)
 {
-    PyCairoSurface *surface;
+    PycairoSurface *surface;
     double x, y;
 
     if (!PyArg_ParseTuple(args, "O!dd:Context.set_source_surface",
-			  &PyCairoSurface_Type, &surface, &x, &y))
+			  &PycairoSurface_Type, &surface, &x, &y))
 	return NULL;
 
     cairo_set_source_surface(c->ctx, surface->surface, x, y);
@@ -871,7 +881,7 @@
 }
 
 static PyObject *
-pycairo_set_tolerance(PyCairoContext *c, PyObject *args)
+pycairo_set_tolerance(PycairoContext *c, PyObject *args)
 {
     double tolerance;
 
@@ -885,7 +895,7 @@
 }
 
 static PyObject *
-pycairo_show_page(PyCairoContext *c)
+pycairo_show_page(PycairoContext *c)
 {
     cairo_show_page(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -894,7 +904,7 @@
 }
 
 static PyObject *
-pycairo_show_text(PyCairoContext *c, PyObject *args)
+pycairo_show_text(PycairoContext *c, PyObject *args)
 {
     const char *utf8;
 
@@ -908,7 +918,7 @@
 }
 
 static PyObject *
-pycairo_stroke(PyCairoContext *c)
+pycairo_stroke(PycairoContext *c)
 {
     cairo_stroke(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -917,7 +927,7 @@
 }
 
 static PyObject *
-pycairo_stroke_extents(PyCairoContext *c)
+pycairo_stroke_extents(PycairoContext *c)
 {
     double x1, y1, x2, y2;
     cairo_stroke_extents(c->ctx, &x1, &y1, &x2, &y2);
@@ -927,7 +937,7 @@
 }
 
 static PyObject *
-pycairo_stroke_preserve(PyCairoContext *c)
+pycairo_stroke_preserve(PycairoContext *c)
 {
     cairo_stroke_preserve(c->ctx);
     if (pycairo_check_status(cairo_status(c->ctx)))
@@ -936,7 +946,7 @@
 }
 
 static PyObject *
-pycairo_text_extents(PyCairoContext *c, PyObject *args)
+pycairo_text_extents(PycairoContext *c, PyObject *args)
 {
     const char *utf8;
     cairo_text_extents_t extents;
@@ -953,7 +963,7 @@
 }
 
 static PyObject *
-pycairo_text_path(PyCairoContext *c, PyObject *args)
+pycairo_text_path(PycairoContext *c, PyObject *args)
 {
     const char *utf8;
 
@@ -967,7 +977,7 @@
 }
 
 static PyObject *
-pycairo_translate(PyCairoContext *c, PyObject *args)
+pycairo_translate(PycairoContext *c, PyObject *args)
 {
     double tx, ty;
 
@@ -981,12 +991,12 @@
 }
 
 static PyObject *
-pycairo_transform(PyCairoContext *c, PyObject *args)
+pycairo_transform(PycairoContext *c, PyObject *args)
 {
-    PyCairoMatrix *matrix;
+    PycairoMatrix *matrix;
 
     if (!PyArg_ParseTuple(args, "O!:Context.transform",
-			  &PyCairoMatrix_Type, &matrix))
+			  &PycairoMatrix_Type, &matrix))
 	return NULL;
 
     cairo_transform(c->ctx, &matrix->matrix);
@@ -996,7 +1006,7 @@
 }
 
 static PyObject *
-pycairo_user_to_device(PyCairoContext *c, PyObject *args)
+pycairo_user_to_device(PycairoContext *c, PyObject *args)
 {
     double x, y;
 
@@ -1010,7 +1020,7 @@
 }
 
 static PyObject *
-pycairo_user_to_device_distance(PyCairoContext *c, PyObject *args)
+pycairo_user_to_device_distance(PycairoContext *c, PyObject *args)
 {
     double dx, dy;
 
@@ -1036,6 +1046,7 @@
     { "clip_preserve", (PyCFunction)pycairo_clip_preserve, METH_NOARGS },
     { "close_path",    (PyCFunction)pycairo_close_path,    METH_NOARGS },
     { "copy_page",     (PyCFunction)pycairo_copy_page,     METH_NOARGS },
+    { "copy_path",     (PyCFunction)pycairo_copy_path,     METH_NOARGS },
     { "curve_to",      (PyCFunction)pycairo_curve_to,      METH_VARARGS },
     { "device_to_user",(PyCFunction)pycairo_device_to_user,METH_VARARGS },
     { "device_to_user_distance",
@@ -1117,11 +1128,11 @@
     { NULL, (getter)0, (setter)0 }
 };
 
-PyTypeObject PyCairoContext_Type = {
+PyTypeObject PycairoContext_Type = {
     PyObject_HEAD_INIT(&PyType_Type)
     0,                                  /* ob_size */
     "cairo.Context",                    /* tp_name */
-    sizeof(PyCairoContext),             /* tp_basicsize */
+    sizeof(PycairoContext),             /* tp_basicsize */
     0,                                  /* tp_itemsize */
     (destructor)pycairo_dealloc,        /* tp_dealloc */
     0,                                  /* tp_print */

Index: pycairo-font.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-font.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- pycairo-font.c	9 May 2005 00:52:46 -0000	1.13
+++ pycairo-font.c	9 May 2005 09:12:31 -0000	1.14
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 James Henstridge
+ * Copyright © 2003-2005 James Henstridge
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,9 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *                 Steve Chaplin
  */
 
 #ifdef HAVE_CONFIG_H
@@ -37,15 +34,15 @@
 #include "pycairo-private.h"
 
 
-/* PyCairoFontFace_FromFontFace
- * Create a new PyCairoFontFace from a cairo_font_face_t
+/* PycairoFontFace_FromFontFace
+ * Create a new PycairoFontFace from a cairo_font_face_t
  * Return value: New reference (NULL on failure)
  */
 PyObject *
-PyCairoFontFace_FromFontFace(cairo_font_face_t *font_face)
+PycairoFontFace_FromFontFace(cairo_font_face_t *font_face)
 {
-    PyCairoFontFace *f = (PyCairoFontFace *)PyCairoFontFace_Type.tp_new
-	(&PyCairoFontFace_Type, NULL, NULL);
+    PycairoFontFace *f = (PycairoFontFace *)PycairoFontFace_Type.tp_new
+	(&PycairoFontFace_Type, NULL, NULL);
     if (f)
 	f->font_face = font_face;
 
@@ -53,7 +50,7 @@
 }
 
 static void
-font_face_dealloc(PyCairoFontFace *f)
+font_face_dealloc(PycairoFontFace *f)
 {
 #ifdef DEBUG
     printf("font_face_dealloc start\n");
@@ -89,11 +86,11 @@
 };
 
 
-PyTypeObject PyCairoFontFace_Type = {
+PyTypeObject PycairoFontFace_Type = {
     PyObject_HEAD_INIT(&PyType_Type)
     0,                                  /* ob_size */
     "cairo.FontFace",                   /* tp_name */
-    sizeof(PyCairoFontFace),            /* tp_basicsize */
+    sizeof(PycairoFontFace),            /* tp_basicsize */
     0,                                  /* tp_itemsize */
     (destructor)font_face_dealloc,      /* tp_dealloc */
     0,                                  /* tp_print */

Index: pycairo-matrix.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-matrix.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- pycairo-matrix.c	9 May 2005 00:52:46 -0000	1.14
+++ pycairo-matrix.c	9 May 2005 09:12:31 -0000	1.15
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 James Henstridge
+ * Copyright © 2003-2005 James Henstridge
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,9 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *                 Steve Chaplin
  */
 
 #ifdef HAVE_CONFIG_H
@@ -37,24 +34,24 @@
 #include "pycairo-private.h"
 
 
-/* PyCairoMatrix_FromMatrix
- * Create a new PyCairoMatrix from a cairo_matrix_t
+/* PycairoMatrix_FromMatrix
+ * Create a new PycairoMatrix from a cairo_matrix_t
  * Return value: New reference (NULL on failure)
  *
  * takes a copy of cairo_matrix_t
  */
 PyObject *
-PyCairoMatrix_FromMatrix(const cairo_matrix_t *matrix)
+PycairoMatrix_FromMatrix(const cairo_matrix_t *matrix)
 {
-    PyCairoMatrix *m = (PyCairoMatrix *)PyCairoMatrix_Type.tp_new
-	(&PyCairoMatrix_Type, NULL, NULL);
+    PycairoMatrix *m = (PycairoMatrix *)PycairoMatrix_Type.tp_new
+	(&PycairoMatrix_Type, NULL, NULL);
     if (m)
 	m->matrix = *matrix;
     return (PyObject *) m;
 }
 
 static void
-matrix_dealloc(PyCairoMatrix *m)
+matrix_dealloc(PycairoMatrix *m)
 {
     m->ob_type->tp_free((PyObject *)m);
 }
@@ -66,7 +63,7 @@
 }
 
 static int
-matrix_init(PyCairoMatrix *m, PyObject *args, PyObject *kwargs)
+matrix_init(PycairoMatrix *m, PyObject *args, PyObject *kwargs)
 {
     static char *kwlist[] = { "xx", "yx", "xy", "yy", "x0", "y0", NULL };
     double xx = 1.0, yx = 0.0, xy = 0.0, yy = 1.0, x0 = 0.0, y0 = 0.0;
@@ -81,44 +78,44 @@
 }
 
 static PyObject *
-matrix_get_xx(PyCairoMatrix *m)
+matrix_get_xx(PycairoMatrix *m)
 {
     return Py_BuildValue("d", m->matrix.xx);
 }
 
 static PyObject *
-matrix_get_yx(PyCairoMatrix *m)
+matrix_get_yx(PycairoMatrix *m)
 {
     return Py_BuildValue("d", m->matrix.yx);
 }
 
 static PyObject *
-matrix_get_xy(PyCairoMatrix *m)
+matrix_get_xy(PycairoMatrix *m)
 {
     return Py_BuildValue("d", m->matrix.xy);
 }
 
 static PyObject *
-matrix_get_yy(PyCairoMatrix *m)
+matrix_get_yy(PycairoMatrix *m)
 {
     return Py_BuildValue("d", m->matrix.yy);
 }
 
 static PyObject *
-matrix_get_x0(PyCairoMatrix *m)
+matrix_get_x0(PycairoMatrix *m)
 {
     return Py_BuildValue("d", m->matrix.x0);
 }
 
 static PyObject *
-matrix_get_y0(PyCairoMatrix *m)
+matrix_get_y0(PycairoMatrix *m)
 {
     return Py_BuildValue("d", m->matrix.y0);
 }
 
 /* return cairo_matrix_t data as a 6-tuple */
 static PyObject *
-matrix_get_value(PyCairoMatrix *m)
+matrix_get_value(PycairoMatrix *m)
 {
     return Py_BuildValue("(dddddd)",
 			 m->matrix.xx, m->matrix.yx, 
@@ -127,7 +124,7 @@
 }
 
 static PyObject *
-matrix_invert(PyCairoMatrix *m)
+matrix_invert(PycairoMatrix *m)
 {
     if (pycairo_check_status(cairo_matrix_invert(&m->matrix))) {
 	return NULL;
@@ -136,11 +133,11 @@
 }
 
 static PyObject *
-matrix_multiply(PyCairoMatrix *m, PyCairoMatrix *m2)
+matrix_multiply(PycairoMatrix *m, PycairoMatrix *m2)
 {
     cairo_matrix_t result;
     cairo_matrix_multiply(&result, &m->matrix, &m2->matrix);
-    return PyCairoMatrix_FromMatrix(&result);
+    return PycairoMatrix_FromMatrix(&result);
 }
 
 static PyNumberMethods matrix_as_number = {
@@ -170,7 +167,7 @@
 };
 
 static PyObject *
-matrix_repr(PyCairoMatrix *m)
+matrix_repr(PycairoMatrix *m)
 {
     char buf[256];
 
@@ -182,14 +179,14 @@
 }
 
 static PyObject *
-matrix_richcmp(PyCairoMatrix *m1, PyCairoMatrix *m2, int op)
+matrix_richcmp(PycairoMatrix *m1, PycairoMatrix *m2, int op)
 {
     int equal;
     PyObject *ret;
     cairo_matrix_t *mx1 = &m1->matrix;
     cairo_matrix_t *mx2 = &m2->matrix;
 
-    if (!PyObject_TypeCheck(m2, &PyCairoMatrix_Type) ||
+    if (!PyObject_TypeCheck(m2, &PycairoMatrix_Type) ||
 	!(op == Py_EQ || op == Py_NE)) {
 	Py_INCREF(Py_NotImplemented);
 	return Py_NotImplemented;
@@ -208,7 +205,7 @@
 }
 
 static PyObject *
-matrix_rotate(PyCairoMatrix *m, PyObject *args)
+matrix_rotate(PycairoMatrix *m, PyObject *args)
 {
     double radians;
 
@@ -220,7 +217,7 @@
 }
 
 static PyObject *
-matrix_scale(PyCairoMatrix *m, PyObject *args)
+matrix_scale(PycairoMatrix *m, PyObject *args)
 {
     double sx, sy;
 
@@ -232,7 +229,7 @@
 }
 
 static PyObject *
-matrix_translate(PyCairoMatrix *m, PyObject *args)
+matrix_translate(PycairoMatrix *m, PyObject *args)
 {
     double tx, ty;
 
@@ -244,7 +241,7 @@
 }
 
 static PyObject *
-matrix_transform_distance(PyCairoMatrix *m, PyObject *args)
+matrix_transform_distance(PycairoMatrix *m, PyObject *args)
 {
     double dx, dy;
 
@@ -256,7 +253,7 @@
 }
 
 static PyObject *
-matrix_transform_point(PyCairoMatrix *m, PyObject *args)
+matrix_transform_point(PycairoMatrix *m, PyObject *args)
 {
     double x, y;
 
@@ -290,11 +287,11 @@
     { NULL, (getter)0, (setter)0 }
 };
 
-PyTypeObject PyCairoMatrix_Type = {
+PyTypeObject PycairoMatrix_Type = {
     PyObject_HEAD_INIT(&PyType_Type)
     0,                                  /* ob_size */
     "cairo.Matrix",                     /* tp_name */
-    sizeof(PyCairoMatrix),              /* tp_basicsize */
+    sizeof(PycairoMatrix),              /* tp_basicsize */
     0,                                  /* tp_itemsize */
     (destructor)matrix_dealloc,         /* tp_dealloc */
     0,                                  /* tp_print */

Index: pycairo-misc.h
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-misc.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- pycairo-misc.h	14 Dec 2004 03:45:31 -0000	1.1
+++ pycairo-misc.h	9 May 2005 09:12:31 -0000	1.2
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 Steve Chaplin
+ * Copyright © 2003-2005 Steve Chaplin
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,9 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *                 Steve Chaplin
  */
 
 #ifndef _PYCAIRO_MISC_H_

--- NEW FILE: pycairo-path.c ---
(This appears to be a binary file; contents omitted.)

Index: pycairo-pattern.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-pattern.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- pycairo-pattern.c	9 May 2005 00:52:46 -0000	1.17
+++ pycairo-pattern.c	9 May 2005 09:12:31 -0000	1.18
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2004 Steve Chaplin
+ * Copyright © 2004-2005 Steve Chaplin
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,9 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *	           Maarten Breddels
  */
 
 #ifdef HAVE_CONFIG_H
@@ -37,22 +34,22 @@
 #include "pycairo-private.h"
 
 
-/* PyCairoPattern_FromPattern
- * Create a new PyCairoPattern from a cairo_pattern_t
+/* PycairoPattern_FromPattern
+ * Create a new PycairoPattern from a cairo_pattern_t
  * Return value: New reference (NULL on failure)
  */
 PyObject *
-PyCairoPattern_FromPattern(cairo_pattern_t *pattern)
+PycairoPattern_FromPattern(cairo_pattern_t *pattern)
 {
-    PyCairoPattern *p = (PyCairoPattern *)PyCairoPattern_Type.tp_new
-	(&PyCairoPattern_Type, NULL, NULL);
+    PycairoPattern *p = (PycairoPattern *)PycairoPattern_Type.tp_new
+	(&PycairoPattern_Type, NULL, NULL);
     if (p)
 	p->pattern = pattern;
     return (PyObject *) p;
 }
 
 static void
-pattern_dealloc(PyCairoPattern *p)
+pattern_dealloc(PycairoPattern *p)
 {
 #ifdef DEBUG
     printf("pattern_dealloc start\n");
@@ -80,17 +77,17 @@
 pattern_create_for_surface(PyTypeObject *type, PyObject *args)
 {
     PyObject *p;
-    PyCairoSurface *s;
+    PycairoSurface *s;
     cairo_pattern_t *pattern;
 
     if (!PyArg_ParseTuple(args, "O!:Pattern.create_for_surface", 
-			  &PyCairoSurface_Type, &s))
+			  &PycairoSurface_Type, &s))
 	return NULL;
 
     pattern = cairo_pattern_create_for_surface (s->surface);
     if (!pattern)
 	return PyErr_NoMemory();
-    p = PyCairoPattern_FromPattern(pattern);
+    p = PycairoPattern_FromPattern(pattern);
     if (!p)
 	cairo_pattern_destroy(pattern);
     return p;
@@ -111,7 +108,7 @@
     pattern = cairo_pattern_create_linear (x0, y0, x1, y1);
     if (!pattern)
 	return PyErr_NoMemory();
-    p = PyCairoPattern_FromPattern(pattern);
+    p = PycairoPattern_FromPattern(pattern);
     if (!p)
 	cairo_pattern_destroy(pattern);
     return p;
@@ -133,14 +130,14 @@
 					   cx1, cy1, radius1);
     if (!pattern)
 	return PyErr_NoMemory();
-    p = PyCairoPattern_FromPattern(pattern);
+    p = PycairoPattern_FromPattern(pattern);
     if (!p)
 	cairo_pattern_destroy(pattern);
     return p;
 }
 
 static PyObject *
-pattern_add_color_stop_rgb(PyCairoPattern *p, PyObject *args)
+pattern_add_color_stop_rgb(PycairoPattern *p, PyObject *args)
 {
     double offset, red, green, blue;
     cairo_status_t status;
@@ -157,7 +154,7 @@
 }
 
 static PyObject *
-pattern_add_color_stop_rgba(PyCairoPattern *p, PyObject *args)
+pattern_add_color_stop_rgba(PycairoPattern *p, PyObject *args)
 {
     double offset, red, green, blue, alpha;
     cairo_status_t status;
@@ -174,12 +171,12 @@
 }
 
 static PyObject *
-pattern_set_matrix(PyCairoPattern *p, PyObject *args)
+pattern_set_matrix(PycairoPattern *p, PyObject *args)
 {
-    PyCairoMatrix *matrix;
+    PycairoMatrix *matrix;
 
     if (!PyArg_ParseTuple(args, "O!:Pattern.set_matrix",
-			  &PyCairoMatrix_Type, &matrix))
+			  &PycairoMatrix_Type, &matrix))
 	return NULL;
 
     /* always returns status = success */
@@ -188,7 +185,7 @@
 }
 
 static PyObject *
-pattern_set_extend(PyCairoPattern *p, PyObject *args)
+pattern_set_extend(PycairoPattern *p, PyObject *args)
 {
     int extend;
 
@@ -201,7 +198,7 @@
 }
  
 static PyObject *
-pattern_set_filter(PyCairoPattern *p, PyObject *args)
+pattern_set_filter(PycairoPattern *p, PyObject *args)
 {
     int filter;
 
@@ -214,22 +211,22 @@
 }
  
 static PyObject *
-pattern_get_matrix(PyCairoPattern *p)
+pattern_get_matrix(PycairoPattern *p)
 {
     cairo_matrix_t matrix;
 
     cairo_pattern_get_matrix(p->pattern, &matrix);
-    return PyCairoMatrix_FromMatrix(&matrix);
+    return PycairoMatrix_FromMatrix(&matrix);
 }
 
 static PyObject *
-pattern_get_extend(PyCairoPattern *p)
+pattern_get_extend(PycairoPattern *p)
 {
     return PyInt_FromLong(cairo_pattern_get_extend(p->pattern));
 }
 
 static PyObject *
-pattern_get_filter(PyCairoPattern *p)
+pattern_get_filter(PycairoPattern *p)
 {
     return PyInt_FromLong(cairo_pattern_get_filter(p->pattern));
 }
@@ -261,11 +258,11 @@
     { NULL, (getter)0, (setter)0 }
 };
 
-PyTypeObject PyCairoPattern_Type = {
+PyTypeObject PycairoPattern_Type = {
     PyObject_HEAD_INIT(&PyType_Type)
     0,                                  /* ob_size */
     "cairo.Pattern",                    /* tp_name */
-    sizeof(PyCairoPattern),             /* tp_basicsize */
+    sizeof(PycairoPattern),             /* tp_basicsize */
     0,                                  /* tp_itemsize */
     (destructor)pattern_dealloc,        /* tp_dealloc */
     0,                                  /* tp_print */

Index: pycairo-private.h
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-private.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- pycairo-private.h	9 May 2005 00:52:46 -0000	1.20
+++ pycairo-private.h	9 May 2005 09:12:31 -0000	1.21
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 James Henstridge
+ * Copyright © 2003-2005 James Henstridge
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,9 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *
  */
 
 #ifndef _PYCAIRO_PRIVATE_H_
@@ -43,22 +40,23 @@
 #include "pycairo-misc.h"
 
 
-extern PyTypeObject PyCairoContext_Type;
-extern PyTypeObject PyCairoFontFace_Type;
-extern PyTypeObject PyCairoMatrix_Type;
-extern PyTypeObject PyCairoPattern_Type;
+extern PyTypeObject PycairoContext_Type;
+extern PyTypeObject PycairoFontFace_Type;
+extern PyTypeObject PycairoMatrix_Type;
+extern PyTypeObject PycairoPath_Type;
+extern PyTypeObject PycairoPattern_Type;
 
-extern PyTypeObject PyCairoSurface_Type;
-extern PyTypeObject PyCairoImageSurface_Type;
-extern PyTypeObject PyCairoPDFSurface_Type;
+extern PyTypeObject PycairoSurface_Type;
+extern PyTypeObject PycairoImageSurface_Type;
+extern PyTypeObject PycairoPDFSurface_Type;
 
 int       pycairo_check_status(cairo_status_t status);
 
-/* takes ownership of reference */
-PyObject *PyCairoContext_FromContext(cairo_t *ctx, PyObject *base);
-PyObject *PyCairoFontFace_FromFontFace(cairo_font_face_t *font_face);
-PyObject *PyCairoMatrix_FromMatrix(const cairo_matrix_t *matrix);
-PyObject *PyCairoPattern_FromPattern(cairo_pattern_t *pattern);
-PyObject *PyCairoSurface_FromSurface(cairo_surface_t *surface, PyObject *base);
+PyObject *PycairoContext_FromContext(cairo_t *ctx, PyObject *base);
+PyObject *PycairoFontFace_FromFontFace(cairo_font_face_t *font_face);
+PyObject *PycairoMatrix_FromMatrix(const cairo_matrix_t *matrix);
+PyObject *PycairoPath_FromPath(cairo_path_t *path);
+PyObject *PycairoPattern_FromPattern(cairo_pattern_t *pattern);
+PyObject *PycairoSurface_FromSurface(cairo_surface_t *surface, PyObject *base);
 
 #endif /* _PYCAIRO_PRIVATE_H_ */

Index: pycairo-surface.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-surface.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- pycairo-surface.c	9 May 2005 00:52:46 -0000	1.34
+++ pycairo-surface.c	9 May 2005 09:12:31 -0000	1.35
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 James Henstridge
+ * Copyright © 2003-2005 James Henstridge
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,10 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- * 	           Maarten Breddels
- *                 Steve Chaplin
  */
 
 #ifdef HAVE_CONFIG_H
@@ -44,8 +40,8 @@
 
 /* Class Surface ----------------------------------------------------------- */
 
-/* PyCairoSurface_FromSurface
- * Create a new PyCairoSurface from a cairo_surface_t
+/* PycairoSurface_FromSurface
+ * Create a new PycairoSurface from a cairo_surface_t
  * Return value: New reference (NULL on failure)
  *
  * base - the base object used to create the surface, or NULL.
@@ -53,10 +49,10 @@
  *        is being used
  */
 PyObject *
-PyCairoSurface_FromSurface(cairo_surface_t *surface, PyObject *base)
+PycairoSurface_FromSurface(cairo_surface_t *surface, PyObject *base)
 {
-    PyCairoSurface *s = (PyCairoSurface *)PyCairoSurface_Type.tp_new
-	(&PyCairoSurface_Type, NULL, NULL);
+    PycairoSurface *s = (PycairoSurface *)PycairoSurface_Type.tp_new
+	(&PycairoSurface_Type, NULL, NULL);
     if (s) {
 	s->surface = surface;
 	Py_XINCREF(base);
@@ -66,7 +62,7 @@
 }
 
 static void
-surface_dealloc(PyCairoSurface *s)
+surface_dealloc(PycairoSurface *s)
 {
 #ifdef DEBUG
     printf("surface_dealloc start\n");
@@ -91,7 +87,7 @@
 }
 
 static int
-surface_init(PyCairoSurface *s, PyObject *args, PyObject *kwds)
+surface_init(PycairoSurface *s, PyObject *args, PyObject *kwds)
 {
     PyErr_SetString(PyExc_TypeError,
 		    "The BaseSurface type cannot be instantiated");
@@ -99,7 +95,7 @@
 }
 
 static PyObject *
-surface_create_similar(PyCairoSurface *s, PyObject *args)
+surface_create_similar(PycairoSurface *s, PyObject *args)
 {
     PyObject *s2;
     cairo_surface_t *surface;
@@ -115,16 +111,16 @@
 	return PyErr_NoMemory();
 
     /* bug #2765 - "How do we identify surface types?"
-     * determine surface type and use PyCairoImageSurface_FromImageSurface() etc
+     * determine surface type and use PycairoImageSurface_FromImageSurface() etc
      */
-    s2 = PyCairoSurface_FromSurface(surface, NULL);
+    s2 = PycairoSurface_FromSurface(surface, NULL);
     if (!s2)
 	cairo_surface_destroy(surface);
     return s2;
 }
 
 static PyObject *
-surface_finish(PyCairoSurface *s)
+surface_finish(PycairoSurface *s)
 {
     cairo_status_t status = cairo_surface_finish(s->surface);
     Py_CLEAR(s->base);
@@ -135,7 +131,7 @@
 }
 
 static PyObject *
-surface_set_device_offset(PyCairoSurface *s, PyObject *args)
+surface_set_device_offset(PycairoSurface *s, PyObject *args)
 {
     double x_offset, y_offset;
 
@@ -149,7 +145,7 @@
 
 #ifdef CAIRO_HAS_PNG_FUNCTIONS
 static PyObject *
-surface_write_to_png(PyCairoSurface *s, PyObject *args)
+surface_write_to_png(PycairoSurface *s, PyObject *args)
 {
     const char *filename;
     cairo_status_t status;
@@ -187,11 +183,11 @@
     { NULL, }
 };
 
-PyTypeObject PyCairoSurface_Type = {
+PyTypeObject PycairoSurface_Type = {
     PyObject_HEAD_INIT(&PyType_Type)
     0,                                  /* ob_size */
     "cairo.Surface",                    /* tp_name */
-    sizeof(PyCairoSurface),             /* tp_basicsize */
+    sizeof(PycairoSurface),             /* tp_basicsize */
     0,                                  /* tp_itemsize */
     (destructor)surface_dealloc,        /* tp_dealloc */
     0,                                  /* tp_print */
@@ -236,10 +232,10 @@
 /* Class ImageSurface ------------------------------------------------------ */
 
 PyObject *
-PyCairoImageSurface_FromImageSurface(cairo_surface_t *surface, PyObject *base)
+PycairoImageSurface_FromImageSurface(cairo_surface_t *surface, PyObject *base)
 {
-    PyCairoImageSurface *s = (PyCairoImageSurface *)PyCairoImageSurface_Type.tp_new
-	(&PyCairoImageSurface_Type, NULL, NULL);
+    PycairoImageSurface *s = (PycairoImageSurface *)PycairoImageSurface_Type.tp_new
+	(&PycairoImageSurface_Type, NULL, NULL);
     if (s) {
 	s->surface = surface;
 	Py_XINCREF(base);
@@ -249,7 +245,7 @@
 }
 
 static int
-image_surface_init(PyCairoSurface *s, PyObject *args, PyObject *kwds)
+image_surface_init(PycairoSurface *s, PyObject *args, PyObject *kwds)
 {
     cairo_format_t format;
     int width, height;
@@ -326,7 +322,7 @@
     if (!surface)
 	return PyErr_NoMemory();
 
-    s = PyCairoImageSurface_FromImageSurface(surface, (PyObject *)array);
+    s = PycairoImageSurface_FromImageSurface(surface, (PyObject *)array);
     if (!s)
 	cairo_surface_destroy(surface);
     return s;
@@ -382,7 +378,7 @@
     if (!surface)
 	return PyErr_NoMemory();
 
-    s = PyCairoImageSurface_FromImageSurface(surface, NULL);
+    s = PycairoImageSurface_FromImageSurface(surface, NULL);
     if (!s)
 	cairo_surface_destroy(surface);
     return s;
@@ -408,7 +404,7 @@
 			"not be allocated for operation");
 	return NULL;
     }
-    s = PyCairoImageSurface_FromImageSurface(surface, NULL);
+    s = PycairoImageSurface_FromImageSurface(surface, NULL);
     if (!s)
 	cairo_surface_destroy(surface);
     return s;
@@ -416,13 +412,13 @@
 #endif /* CAIRO_HAS_PNG_FUNCTIONS */
 
 static PyObject *
-image_surface_get_height(PyCairoImageSurface *s)
+image_surface_get_height(PycairoImageSurface *s)
 {
     return Py_BuildValue("i", cairo_image_surface_get_height(s->surface));
 }
 
 static PyObject *
-image_surface_get_width(PyCairoImageSurface *s)
+image_surface_get_width(PycairoImageSurface *s)
 {
     return Py_BuildValue("i", cairo_image_surface_get_width(s->surface));
 }
@@ -450,11 +446,11 @@
     { NULL, (getter)0, (setter)0 }
 };
 
-PyTypeObject PyCairoImageSurface_Type = {
+PyTypeObject PycairoImageSurface_Type = {
     PyObject_HEAD_INIT(&PyType_Type)
     0,                                  /* ob_size */
     "cairo.ImageSurface",               /* tp_name */
-    sizeof(PyCairoImageSurface),        /* tp_basicsize */
+    sizeof(PycairoImageSurface),        /* tp_basicsize */
     0,                                  /* tp_itemsize */
     0,                                  /* tp_dealloc */
     0,                                  /* tp_print */
@@ -482,7 +478,7 @@
     image_surface_methods,              /* tp_methods */
     0,                                  /* tp_members */
     image_surface_getsets,              /* tp_getset */
-    &PyCairoSurface_Type,               /* tp_base */
+    &PycairoSurface_Type,               /* tp_base */
     0,                                  /* tp_dict */
     0,                                  /* tp_descr_get */
     0,                                  /* tp_descr_set */
@@ -499,10 +495,10 @@
 /* Class PDFSurface ------------------------------------------------------ */
 
 PyObject *
-PyCairoPDFSurface_FromPDFSurface(cairo_surface_t *surface, PyObject *base)
+PycairoPDFSurface_FromPDFSurface(cairo_surface_t *surface, PyObject *base)
 {
-    PyCairoPDFSurface *s = (PyCairoPDFSurface *)PyCairoPDFSurface_Type.tp_new
-	(&PyCairoPDFSurface_Type, NULL, NULL);
+    PycairoPDFSurface *s = (PycairoPDFSurface *)PycairoPDFSurface_Type.tp_new
+	(&PycairoPDFSurface_Type, NULL, NULL);
     if (s) {
 	s->surface = surface;
 	Py_XINCREF(base);
@@ -512,7 +508,7 @@
 }
 
 static int
-pdf_surface_init(PyCairoSurface *s, PyObject *args, PyObject *kwds)
+pdf_surface_init(PycairoSurface *s, PyObject *args, PyObject *kwds)
 {
     PyObject *file_object;
     int width_inches, height_inches, x_pixels_per_inch, y_pixels_per_inch;
@@ -551,11 +547,11 @@
     return 0;
 }
 
-PyTypeObject PyCairoPDFSurface_Type = {
+PyTypeObject PycairoPDFSurface_Type = {
     PyObject_HEAD_INIT(&PyType_Type)
     0,                                  /* ob_size */
     "cairo.PDFSurface",                 /* tp_name */
-    sizeof(PyCairoPDFSurface),          /* tp_basicsize */
+    sizeof(PycairoPDFSurface),          /* tp_basicsize */
     0,                                  /* tp_itemsize */
     0,                                  /* tp_dealloc */
     0,                                  /* tp_print */
@@ -583,7 +579,7 @@
     0,                                  /* tp_methods */
     0,                                  /* tp_members */
     0,                                  /* tp_getset */
-    &PyCairoSurface_Type,               /* tp_base */
+    &PycairoSurface_Type,               /* tp_base */
     0,                                  /* tp_dict */
     0,                                  /* tp_descr_get */
     0,                                  /* tp_descr_set */

Index: pycairo.h
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- pycairo.h	9 May 2005 00:52:46 -0000	1.27
+++ pycairo.h	9 May 2005 09:12:31 -0000	1.28
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 James Henstridge
+ * Copyright © 2003-2005 James Henstridge
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,9 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *
  */
 
 #ifndef _PYCAIRO_H_
@@ -51,31 +48,36 @@
     PyObject_HEAD
     cairo_t *ctx;
     PyObject *base; /* base object used to create context, or NULL */
-} PyCairoContext;
+} PycairoContext;
 
 typedef struct {
     PyObject_HEAD
     cairo_font_face_t *font_face;
-} PyCairoFontFace;
+} PycairoFontFace;
 
 typedef struct {
     PyObject_HEAD
     cairo_matrix_t matrix;
-} PyCairoMatrix;
+} PycairoMatrix;
+
+typedef struct {
+    PyObject_HEAD
+    cairo_path_t *path;
+} PycairoPath;
 
 typedef struct {
     PyObject_HEAD
     cairo_pattern_t *pattern;
-} PyCairoPattern;
+} PycairoPattern;
 
 typedef struct {
     PyObject_HEAD
     cairo_surface_t *surface;
     PyObject *base; /* base object used to create surface, or NULL */
-} PyCairoSurface;
+} PycairoSurface;
 
-#define PyCairoImageSurface PyCairoSurface
-#define PyCairoPDFSurface   PyCairoSurface
+#define PycairoImageSurface PycairoSurface
+#define PycairoPDFSurface   PycairoSurface
 
 /* Define structure for C API. */
 typedef struct {
@@ -83,6 +85,7 @@
     PyTypeObject *Context_Type;
     PyTypeObject *FontFace_Type;
     PyTypeObject *Matrix_Type;
+    PyTypeObject *Path_Type;
     PyTypeObject *Pattern_Type;
     PyTypeObject *Surface_Type;
 
@@ -90,36 +93,37 @@
     PyObject *(*Context_FromContext)(cairo_t *ctx, PyObject *base);
     PyObject *(*FontFace_FromFontFace)(cairo_font_face_t *font_face);
     PyObject *(*Matrix_FromMatrix)(const cairo_matrix_t *matrix);
+    PyObject *(*Path_FromPath)(cairo_path_t *path);
     PyObject *(*Pattern_FromPattern)(cairo_pattern_t *pattern);
     PyObject *(*Surface_FromSurface)(cairo_surface_t *surface, PyObject *base);
 
     /* misc functions */
     int (* check_status)(cairo_status_t status);
-} PyCairo_CAPI_t;
+} Pycairo_CAPI_t;
 
 
 #ifndef _INSIDE_PYCAIRO_
 
 /* Macros for accessing the C API */
-#define PyCairoContext_Type         *(PyCairo_CAPI->Context_Type)
-#define PyCairoFontFace_Type        *(PyCairo_CAPI->Fontface_Type)
-#define PyCairoMatrix_Type          *(PyCairo_CAPI->Matrix_Type)
-#define PyCairoPattern_Type         *(PyCairo_CAPI->Pattern_Type)
-#define PyCairoSurface_Type         *(PyCairo_CAPI->Surface_Type)
+#define PycairoContext_Type         *(Pycairo_CAPI->Context_Type)
+#define PycairoFontFace_Type        *(Pycairo_CAPI->Fontface_Type)
+#define PycairoMatrix_Type          *(Pycairo_CAPI->Matrix_Type)
+#define PycairoPattern_Type         *(Pycairo_CAPI->Pattern_Type)
+#define PycairoSurface_Type         *(Pycairo_CAPI->Surface_Type)
 
-#define PyCairoContext_FromContext   (PyCairo_CAPI->Context_FromContext)
-#define PyCairoFontFace_FromFontFace (PyCairo_CAPI->Fontface_FromFontFace)
-#define PyCairoMatrix_FromMatrix     (PyCairo_CAPI->Matrix_FromMatrix)
-#define PyCairoPattern_FromPattern   (PyCairo_CAPI->Pattern_FromPattern)
-#define PyCairoSurface_FromSurface   (PyCairo_CAPI->Surface_FromSurface)
+#define PycairoContext_FromContext   (Pycairo_CAPI->Context_FromContext)
+#define PycairoFontFace_FromFontFace (Pycairo_CAPI->Fontface_FromFontFace)
+#define PycairoMatrix_FromMatrix     (Pycairo_CAPI->Matrix_FromMatrix)
+#define PycairoPattern_FromPattern   (Pycairo_CAPI->Pattern_FromPattern)
+#define PycairoSurface_FromSurface   (Pycairo_CAPI->Surface_FromSurface)
 
-#define pycairo_check_status         (PyCairo_CAPI->check_status)
+#define pycairo_check_status         (Pycairo_CAPI->check_status)
 
 /* Define global variable for the C API and a macro for setting it. */
-static PyCairo_CAPI_t *PyCairo_CAPI;
+static Pycairo_CAPI_t *Pycairo_CAPI;
 
-#define PyCairo_IMPORT \
-        PyCairo_CAPI = (PyCairo_CAPI_t*) PyCObject_Import("cairo", \
+#define Pycairo_IMPORT \
+        Pycairo_CAPI = (Pycairo_CAPI_t*) PyCObject_Import("cairo", \
                                                           "pycairo_CAPI")
 
 #endif /* ifndef _INSIDE_PYCAIRO_ */

Index: pycairosvg-context.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairosvg-context.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pycairosvg-context.c	6 May 2005 13:46:13 -0000	1.4
+++ pycairosvg-context.c	9 May 2005 09:12:31 -0000	1.5
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 Steve Chaplin
+ * Copyright © 2003-2005 Steve Chaplin
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,9 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *                 Steve Chaplin
  */
 
 #include <Python.h>
@@ -45,7 +42,7 @@
 typedef struct { 
     PyObject_HEAD
     svg_cairo_t *ctx;
-} PyCairoSVGContext;
+} PycairoSVGContext;
 
 
 /* if status reports an error, then return 1 (True) and set the exception */
@@ -81,7 +78,7 @@
 
 
 static void
-pycairosvg_dealloc(PyCairoSVGContext* self)                  
+pycairosvg_dealloc(PycairoSVGContext* self)                  
 {
     if (self->ctx) {
 	svg_cairo_destroy(self->ctx);
@@ -94,7 +91,7 @@
 static PyObject *
 pycairosvg_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
 {               
-    PyCairoSVGContext *self = (PyCairoSVGContext *)type->tp_alloc(type, 0);
+    PycairoSVGContext *self = (PycairoSVGContext *)type->tp_alloc(type, 0);
     if (self && _status_error (svg_cairo_create (&self->ctx))) {
 	Py_DECREF(self);
 	return NULL;
@@ -106,7 +103,7 @@
 
 
 static PyObject *
-pycairosvg_parse (PyCairoSVGContext *self, PyObject *args)
+pycairosvg_parse (PycairoSVGContext *self, PyObject *args)
 {
     char *filename;
 
@@ -119,7 +116,7 @@
 }
 
 static PyObject *
-pycairosvg_parse_buffer (PyCairoSVGContext *self, PyObject *args)
+pycairosvg_parse_buffer (PycairoSVGContext *self, PyObject *args)
 {
     const char *buf;
     size_t count;
@@ -134,12 +131,12 @@
 }
 
 static PyObject *
-pycairosvg_render (PyCairoSVGContext *self, PyObject *args)
+pycairosvg_render (PycairoSVGContext *self, PyObject *args)
 {
-    PyCairoContext *xrs;
+    PycairoContext *xrs;
 
     if (!PyArg_ParseTuple(args, "O!:Context.render", 
-			  &PyCairoContext_Type, &xrs))
+			  &PycairoContext_Type, &xrs))
 	return NULL;
 
     if (_status_error (svg_cairo_render (self->ctx, xrs->ctx)))
@@ -149,7 +146,7 @@
 
 
 static PyObject *
-pycairosvg_get_size (PyCairoSVGContext *self, void *closure)
+pycairosvg_get_size (PycairoSVGContext *self, void *closure)
 {
     int width, height;
 
@@ -177,11 +174,11 @@
 };
 
 
-PyTypeObject PyCairoSVGContext_Type = {
+PyTypeObject PycairoSVGContext_Type = {
     PyObject_HEAD_INIT(NULL)
     0,                         /*ob_size*/
     "cairo.svg.Context",       /*tp_name*/
-    sizeof(PyCairoSVGContext), /*tp_basicsize*/
+    sizeof(PycairoSVGContext), /*tp_basicsize*/
     0,                         /*tp_itemsize*/
     (destructor)pycairosvg_dealloc, /*tp_dealloc*/
     0,                         /*tp_print*/

Index: pycairosvg-private.h
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairosvg-private.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pycairosvg-private.h	6 May 2005 13:46:13 -0000	1.2
+++ pycairosvg-private.h	9 May 2005 09:12:31 -0000	1.3
@@ -1,8 +1,8 @@
 /* -*- mode: C; c-basic-offset: 4 -*- 
  *
- * PyCairo - Python bindings for Cairo
+ * Pycairo - Python bindings for cairo
  *
- * Copyright © 2003-2004 Steve Chaplin
+ * Copyright © 2003-2005 Steve Chaplin
  *
  * This library is free software; you can redistribute it and/or
  * modify it either under the terms of the GNU Lesser General Public
@@ -26,9 +26,6 @@
  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *                 Steve Chaplin
  */
 
 #ifndef _PYCAIROSVG_PRIVATE_H_
@@ -42,6 +39,6 @@
 #include <svg-cairo.h>
 #include "pycairo-misc.h"
 
-extern PyTypeObject PyCairoSVGContext_Type;
+extern PyTypeObject PycairoSVGContext_Type;
 
 #endif

Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/Makefile.am,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Makefile.am	2 May 2005 02:25:51 -0000	1.11
+++ Makefile.am	9 May 2005 09:12:31 -0000	1.12
@@ -19,6 +19,7 @@
   pycairo-font.c \
   pycairo-matrix.c \
   pycairo-misc.h \
+  pycairo-path.c \
   pycairo-pattern.c \
   pycairo-private.h \
   pycairo-surface.c \




More information about the cairo-commit mailing list