[cairo-commit] pycairo/cairo cairomodule.c, 1.53,
1.54 pycairo-surface.c, 1.77, 1.78
Steve Chaplin
commit at pdx.freedesktop.org
Sat Jul 1 01:05:54 PDT 2006
Committed by: stevech1097
Update of /cvs/cairo/pycairo/cairo
In directory kemper:/tmp/cvs-serv24769/cairo
Modified Files:
cairomodule.c pycairo-surface.c
Log Message:
'SC'
Index: cairomodule.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/cairomodule.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- cairomodule.c 28 May 2006 02:03:07 -0000 1.53
+++ cairomodule.c 1 Jul 2006 08:05:52 -0000 1.54
@@ -396,6 +396,7 @@
CONSTANT(FORMAT_RGB24);
CONSTANT(FORMAT_A8);
CONSTANT(FORMAT_A1);
+ CONSTANT(FORMAT_RGB16_565);
CONSTANT(HINT_METRICS_DEFAULT);
CONSTANT(HINT_METRICS_OFF);
Index: pycairo-surface.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-surface.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- pycairo-surface.c 26 Jun 2006 13:59:35 -0000 1.77
+++ pycairo-surface.c 1 Jul 2006 08:05:52 -0000 1.78
@@ -473,10 +473,13 @@
case CAIRO_FORMAT_RGB24:
stride = width * 4;
break;
+ case CAIRO_FORMAT_RGB16_565:
+ stride = width * 2;
+ break;
case CAIRO_FORMAT_A8:
stride = width;
break;
- case CAIRO_FORMAT_A1:
+ case CAIRO_FORMAT_A1: /* should be stride = (width + 31) / 32 * 4 ? */
stride = (width + 1) / 8;
break;
default:
@@ -1107,8 +1110,22 @@
return PyInt_FromLong (cairo_xlib_surface_get_depth (o->surface));
}
+static PyObject *
+xlib_surface_get_height (PycairoXlibSurface *o)
+{
+ return PyInt_FromLong (cairo_xlib_surface_get_height (o->surface));
+}
+
+static PyObject *
+xlib_surface_get_width (PycairoXlibSurface *o)
+{
+ return PyInt_FromLong (cairo_xlib_surface_get_width (o->surface));
+}
+
static PyMethodDef xlib_surface_methods[] = {
{"get_depth", (PyCFunction)xlib_surface_get_depth, METH_NOARGS },
+ {"get_height",(PyCFunction)xlib_surface_get_height, METH_NOARGS },
+ {"get_width", (PyCFunction)xlib_surface_get_width, METH_NOARGS },
{NULL, NULL, 0, NULL},
};
More information about the cairo-commit
mailing list