[cairo-commit] pycairo/cairo pycairo-surface.c,1.66,1.67

Steve Chaplin commit at pdx.freedesktop.org
Sat May 6 19:48:56 PDT 2006


Committed by: stevech1097

Update of /cvs/cairo/pycairo/cairo
In directory kemper:/tmp/cvs-serv15938/cairo

Modified Files:
	pycairo-surface.c 
Log Message:
'SC'

Index: pycairo-surface.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-surface.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- pycairo-surface.c	1 May 2006 02:20:15 -0000	1.66
+++ pycairo-surface.c	7 May 2006 02:48:54 -0000	1.67
@@ -832,6 +832,20 @@
 }
 
 static PyObject *
+ps_surface_dsc_comment (PycairoPSSurface *o, PyObject *args)
+{
+    const char *comment;
+
+    if (!PyArg_ParseTuple(args, "s:PSSurface.dsc_comment", &comment))
+	return NULL;
+
+    cairo_ps_surface_dsc_comment (o->surface, comment);
+    if (Pycairo_Check_Status (cairo_surface_status (o->surface)))
+	return NULL;
+    Py_RETURN_NONE;
+}
+
+static PyObject *
 ps_surface_set_dpi (PycairoPSSurface *o, PyObject *args)
 {
     double x_dpi, y_dpi;
@@ -842,8 +856,22 @@
     Py_RETURN_NONE;
 }
 
+static PyObject *
+ps_surface_set_size (PycairoPSSurface *o, PyObject *args)
+{
+    double width_in_points, height_in_points;
+
+    if (!PyArg_ParseTuple(args, "dd:PSSurface.set_size",
+			  &width_in_points, &height_in_points))
+	return NULL;
+    cairo_ps_surface_set_size (o->surface, width_in_points, height_in_points);
+    Py_RETURN_NONE;
+}
+
 static PyMethodDef ps_surface_methods[] = {
-    {"set_dpi", (PyCFunction)ps_surface_set_dpi,    METH_VARARGS },
+    {"dsc_comment", (PyCFunction)ps_surface_dsc_comment,     METH_VARARGS },
+    {"set_dpi",  (PyCFunction)ps_surface_set_dpi,            METH_VARARGS },
+    {"set_size", (PyCFunction)ps_surface_set_size,           METH_VARARGS },
     {NULL, NULL, 0, NULL},
 };
 



More information about the cairo-commit mailing list