[cairo-commit] pycairo/cairo pycairo-surface.c, 1.68, 1.69 pycairo-context.c, 1.73, 1.74

Steve Chaplin commit at pdx.freedesktop.org
Mon May 15 22:55:29 PDT 2006


Committed by: stevech1097

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

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

Index: pycairo-surface.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-surface.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- pycairo-surface.c	13 May 2006 09:29:49 -0000	1.68
+++ pycairo-surface.c	16 May 2006 05:55:26 -0000	1.69
@@ -176,6 +176,14 @@
 }
 
 static PyObject *
+surface_get_device_offset (PycairoSurface *o)
+{
+    double x_offset, y_offset;
+    cairo_surface_get_device_offset (o->surface, &x_offset, &y_offset);
+    return Py_BuildValue("(dd)", x_offset, y_offset);
+}
+
+static PyObject *
 surface_get_font_options (PycairoSurface *o)
 {
     cairo_font_options_t *options = cairo_font_options_create();
@@ -297,6 +305,8 @@
     {"create_similar", (PyCFunction)surface_create_similar,    METH_VARARGS },
     {"finish",         (PyCFunction)surface_finish,            METH_NOARGS },
     {"flush",          (PyCFunction)surface_flush,             METH_NOARGS },
+    {"get_device_offset",(PyCFunction)surface_get_device_offset,
+                                                                METH_NOARGS },
     {"get_font_options",(PyCFunction)surface_get_font_options, METH_NOARGS },
     {"mark_dirty",     (PyCFunction)surface_mark_dirty,        METH_KEYWORDS },
     {"set_device_offset",(PyCFunction)surface_set_device_offset,
@@ -1131,7 +1141,14 @@
     return NULL;
 }
 
+static PyObject *
+xlib_surface_get_depth (PycairoXlibSurface *o)
+{
+    return Py_BuildValue("i", cairo_xlib_surface_get_depth (o->surface));
+}
+
 static PyMethodDef xlib_surface_methods[] = {
+    {"get_depth", (PyCFunction)xlib_surface_get_depth,    METH_NOARGS },
     {NULL, NULL, 0, NULL},
 };
 

Index: pycairo-context.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-context.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- pycairo-context.c	15 May 2006 14:24:38 -0000	1.73
+++ pycairo-context.c	16 May 2006 05:55:26 -0000	1.74
@@ -353,6 +353,16 @@
 }
 
 static PyObject *
+pycairo_get_group_target (PycairoContext *o)
+{
+    cairo_surface_t *surface = cairo_get_group_target (o->ctx);
+    if (surface != NULL)
+	return PycairoSurface_FromSurface (cairo_surface_reference (surface),
+					   NULL);
+    Py_RETURN_NONE;
+}
+
+static PyObject *
 pycairo_get_line_cap (PycairoContext *o)
 {
     return PyInt_FromLong(cairo_get_line_cap (o->ctx));
@@ -1140,6 +1150,7 @@
     {"get_font_face",   (PyCFunction)pycairo_get_font_face,   METH_NOARGS},
     {"get_font_matrix", (PyCFunction)pycairo_get_font_matrix, METH_NOARGS},
     {"get_font_options",(PyCFunction)pycairo_get_font_options,METH_NOARGS},
+    {"get_group_target",(PyCFunction)pycairo_get_group_target,METH_NOARGS},
     {"get_line_cap",    (PyCFunction)pycairo_get_line_cap,    METH_NOARGS},
     {"get_line_join",   (PyCFunction)pycairo_get_line_join,   METH_NOARGS},
     {"get_line_width",  (PyCFunction)pycairo_get_line_width,  METH_NOARGS},



More information about the cairo-commit mailing list