[cairo-commit] pycairo/cairo pycairo-surface.c,1.75,1.76
Steve Chaplin
commit at pdx.freedesktop.org
Sat Jun 24 22:54:36 PDT 2006
Committed by: stevech1097
Update of /cvs/cairo/pycairo/cairo
In directory kemper:/tmp/cvs-serv15616/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.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- pycairo-surface.c 22 Jun 2006 04:52:31 -0000 1.75
+++ pycairo-surface.c 25 Jun 2006 05:54:34 -0000 1.76
@@ -194,6 +194,12 @@
}
static PyObject *
+surface_get_content (PycairoSurface *o)
+{
+ return PyInt_FromLong (cairo_surface_get_content (o->surface));
+}
+
+static PyObject *
surface_get_device_offset (PycairoSurface *o)
{
double x_offset, y_offset;
@@ -297,6 +303,7 @@
{"create_similar", (PyCFunction)surface_create_similar, METH_VARARGS },
{"finish", (PyCFunction)surface_finish, METH_NOARGS },
{"flush", (PyCFunction)surface_flush, METH_NOARGS },
+ {"get_content", (PyCFunction)surface_get_content, METH_NOARGS },
{"get_device_offset",(PyCFunction)surface_get_device_offset,
METH_NOARGS },
{"get_font_options",(PyCFunction)surface_get_font_options, METH_NOARGS },
@@ -532,15 +539,27 @@
#endif /* CAIRO_HAS_PNG_FUNCTIONS */
static PyObject *
+image_surface_get_format (PycairoImageSurface *o)
+{
+ return PyInt_FromLong (cairo_image_surface_get_format (o->surface));
+}
+
+static PyObject *
image_surface_get_height (PycairoImageSurface *o)
{
- return Py_BuildValue("i", cairo_image_surface_get_height (o->surface));
+ return PyInt_FromLong (cairo_image_surface_get_height (o->surface));
}
static PyObject *
image_surface_get_width (PycairoImageSurface *o)
{
- return Py_BuildValue("i", cairo_image_surface_get_width (o->surface));
+ return PyInt_FromLong (cairo_image_surface_get_width (o->surface));
+}
+
+static PyObject *
+image_surface_get_stride (PycairoImageSurface *o)
+{
+ return PyInt_FromLong (cairo_image_surface_get_stride (o->surface));
}
#ifdef HAVE_GETDATA
@@ -619,8 +638,10 @@
{"create_from_png", (PyCFunction)image_surface_create_from_png,
METH_O | METH_CLASS },
#endif
+ {"get_format", (PyCFunction)image_surface_get_format, METH_NOARGS},
{"get_height", (PyCFunction)image_surface_get_height, METH_NOARGS},
{"get_width", (PyCFunction)image_surface_get_width, METH_NOARGS},
+ {"get_stride", (PyCFunction)image_surface_get_stride, METH_NOARGS},
#ifdef HAVE_GETDATA
{"to_rgba", (PyCFunction)image_surface_to_rgba, METH_NOARGS},
#endif
@@ -1091,7 +1112,7 @@
static PyObject *
xlib_surface_get_depth (PycairoXlibSurface *o)
{
- return Py_BuildValue("i", cairo_xlib_surface_get_depth (o->surface));
+ return PyInt_FromLong (cairo_xlib_surface_get_depth (o->surface));
}
static PyMethodDef xlib_surface_methods[] = {
More information about the cairo-commit
mailing list