[cairo-commit] pycairo/cairo cairosvgmodule.c, 1.9,
1.10 pycairo-context.c, 1.62, 1.63 pycairo-font.c, 1.26,
1.27 pycairo-matrix.c, 1.21, 1.22 pycairo-path.c, 1.6,
1.7 pycairo-pattern.c, 1.25, 1.26 pycairo-surface.c, 1.52, 1.53
Steve Chaplin
commit at pdx.freedesktop.org
Thu Aug 18 08:21:22 PDT 2005
Committed by: stevech1097
Update of /cvs/cairo/pycairo/cairo
In directory gabe:/tmp/cvs-serv13006/cairo
Modified Files:
cairosvgmodule.c pycairo-context.c pycairo-font.c
pycairo-matrix.c pycairo-path.c pycairo-pattern.c
pycairo-surface.c
Log Message:
'SC'
Index: cairosvgmodule.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/cairosvgmodule.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cairosvgmodule.c 20 Jun 2005 07:17:11 -0000 1.9
+++ cairosvgmodule.c 18 Aug 2005 15:21:20 -0000 1.10
@@ -1,4 +1,4 @@
-/* -*- mode: C; c-basic-offset: 4 -*-
+/* -*- mode: C; c-basic-offset: 4 -*-
*
* Pycairo - Python bindings for cairo
*
@@ -110,7 +110,7 @@
/* class cairo.svg.Context ------------------------------------------------ */
static void
-pycairosvg_dealloc (PycairoSVGContext *o)
+pycairosvg_dealloc (PycairoSVGContext *o)
{
if (o->ctx) {
svg_cairo_destroy (o->ctx);
@@ -122,7 +122,7 @@
static PyObject *
pycairosvg_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
+{
PyObject *o = type->tp_alloc(type, 0);
if (o) {
@@ -158,9 +158,9 @@
if (!PyArg_ParseTuple(args, "t#:Context.parse_buffer", &buf, &count))
return NULL;
- /*svg_cairo_status_t svg_cairo_parse_buffer (svg_cairo_t *svg_cairo,
+ /*svg_cairo_status_t svg_cairo_parse_buffer (svg_cairo_t *svg_cairo,
const char *buf, size_t count);*/
- if (Pycairosvg_Check_Status (svg_cairo_parse_buffer (o->ctx, buf,
+ if (Pycairosvg_Check_Status (svg_cairo_parse_buffer (o->ctx, buf,
count)))
return NULL;
Py_RETURN_NONE;
@@ -171,7 +171,7 @@
{
PycairoContext *xrs;
- if (!PyArg_ParseTuple(args, "O!:Context.render",
+ if (!PyArg_ParseTuple(args, "O!:Context.render",
&PycairoContext_Type, &xrs))
return NULL;
@@ -205,27 +205,27 @@
PyTypeObject PycairoSVGContext_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
- 0, /*ob_size*/
- "cairo.svg.Context", /*tp_name*/
- sizeof(PycairoSVGContext), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- (destructor)pycairosvg_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- 0, /*tp_compare*/
- 0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash */
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,/*tp_flags*/
+ PyObject_HEAD_INIT(NULL)
+ 0, /* ob_size */
+ "cairo.svg.Context", /* tp_name */
+ sizeof(PycairoSVGContext), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)pycairosvg_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_compare */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,/*tp_flags */
0, /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
Index: pycairo-context.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-context.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- pycairo-context.c 9 Aug 2005 10:54:44 -0000 1.62
+++ pycairo-context.c 18 Aug 2005 15:21:20 -0000 1.63
@@ -1189,7 +1189,7 @@
PyTypeObject PycairoContext_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.Context", /* tp_name */
sizeof(PycairoContext), /* tp_basicsize */
Index: pycairo-font.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-font.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- pycairo-font.c 1 Aug 2005 10:25:47 -0000 1.26
+++ pycairo-font.c 18 Aug 2005 15:21:20 -0000 1.27
@@ -1,4 +1,4 @@
-/* -*- mode: C; c-basic-offset: 4 -*-
+/* -*- mode: C; c-basic-offset: 4 -*-
*
* Pycairo - Python bindings for cairo
*
@@ -49,7 +49,7 @@
{
PyObject *o;
- assert (font_face != NULL);
+ assert (font_face != NULL);
if (Pycairo_Check_Status (cairo_font_face_status (font_face))) {
cairo_font_face_destroy (font_face);
@@ -91,7 +91,7 @@
/*
static PyMethodDef font_face_methods[] = {
* methods never exposed in a language binding:
- * cairo_font_face_destroy()
+ * cairo_font_face_destroy()
* cairo_font_face_reference()
* cairo_font_face_get_user_data()
* cairo_font_face_set_user_data(),
@@ -101,7 +101,7 @@
*/
PyTypeObject PycairoFontFace_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.FontFace", /* tp_name */
sizeof(PycairoFontFace), /* tp_basicsize */
@@ -159,7 +159,7 @@
{
PyObject *o;
- assert (scaled_font != NULL);
+ assert (scaled_font != NULL);
if (Pycairo_Check_Status (cairo_scaled_font_status (scaled_font))) {
cairo_scaled_font_destroy (scaled_font);
@@ -206,7 +206,7 @@
PyObject *o = type->tp_alloc(type, 0);
if (o) {
- cairo_scaled_font_t *scaled_font = cairo_scaled_font_create
+ cairo_scaled_font_t *scaled_font = cairo_scaled_font_create
(ff->font_face, &mx1->matrix, &mx2->matrix, fo->font_options);
if (Pycairo_Check_Status (cairo_scaled_font_status (scaled_font))) {
@@ -227,13 +227,13 @@
cairo_scaled_font_extents (o->scaled_font, &e);
if (Pycairo_Check_Status (cairo_scaled_font_status(o->scaled_font)))
return NULL;
- return Py_BuildValue ("(ddddd)", e.ascent, e.descent, e.height,
+ return Py_BuildValue ("(ddddd)", e.ascent, e.descent, e.height,
e.max_x_advance, e.max_y_advance);
}
static PyMethodDef scaled_font_methods[] = {
/* methods never exposed in a language binding:
- * cairo_scaled_font_destroy()
+ * cairo_scaled_font_destroy()
* cairo_scaled_font_reference()
*/
/* glyph_extents - undocumented */
@@ -243,7 +243,7 @@
PyTypeObject PycairoScaledFont_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.ScaledFont", /* tp_name */
sizeof(PycairoScaledFont), /* tp_basicsize */
@@ -301,7 +301,7 @@
{
PyObject *o;
- assert (font_options != NULL);
+ assert (font_options != NULL);
if (Pycairo_Check_Status (cairo_font_options_status (font_options))) {
cairo_font_options_destroy (font_options);
@@ -352,7 +352,7 @@
static PyMethodDef font_options_methods[] = {
/* methods never exposed in a language binding:
- * cairo_font_options_destroy()
+ * cairo_font_options_destroy()
* cairo_font_options_reference()
*/
/* TODO:
@@ -369,7 +369,7 @@
PyTypeObject PycairoFontOptions_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.FontOptions", /* tp_name */
sizeof(PycairoFontOptions), /* tp_basicsize */
Index: pycairo-matrix.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-matrix.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- pycairo-matrix.c 20 May 2005 08:57:44 -0000 1.21
+++ pycairo-matrix.c 18 Aug 2005 15:21:20 -0000 1.22
@@ -1,4 +1,4 @@
-/* -*- mode: C; c-basic-offset: 4 -*-
+/* -*- mode: C; c-basic-offset: 4 -*-
*
* Pycairo - Python bindings for cairo
*
@@ -75,7 +75,7 @@
o = type->tp_alloc(type, 0);
if (o)
- cairo_matrix_init (&((PycairoMatrix *)o)->matrix,
+ cairo_matrix_init (&((PycairoMatrix *)o)->matrix,
xx, yx, xy, yy, x0, y0);
return o;
}
@@ -134,8 +134,8 @@
matrix_get_value (PycairoMatrix *o)
{
return Py_BuildValue("(dddddd)",
- o->matrix.xx, o->matrix.yx,
- o->matrix.xy, o->matrix.yy,
+ o->matrix.xx, o->matrix.yx,
+ o->matrix.xy, o->matrix.yy,
o->matrix.x0, o->matrix.y0);
}
@@ -187,8 +187,8 @@
char buf[256];
PyOS_snprintf(buf, sizeof(buf), "cairo.Matrix(%g, %g, %g, %g, %g, %g)",
- o->matrix.xx, o->matrix.yx,
- o->matrix.xy, o->matrix.yy,
+ o->matrix.xx, o->matrix.yx,
+ o->matrix.xy, o->matrix.yy,
o->matrix.x0, o->matrix.y0);
return PyString_FromString(buf);
}
@@ -226,7 +226,7 @@
if (!PyArg_ParseTuple(args, "d:Matrix.rotate", &radians))
return NULL;
-
+
cairo_matrix_rotate (&o->matrix, radians);
Py_RETURN_NONE;
}
@@ -238,7 +238,7 @@
if (!PyArg_ParseTuple(args, "dd:Matrix.scale", &sx, &sy))
return NULL;
-
+
cairo_matrix_scale (&o->matrix, sx, sy);
Py_RETURN_NONE;
}
@@ -250,7 +250,7 @@
if (!PyArg_ParseTuple(args, "dd:Matrix.translate", &tx, &ty))
return NULL;
-
+
cairo_matrix_translate (&o->matrix, tx, ty);
Py_RETURN_NONE;
}
@@ -289,7 +289,7 @@
* cairo_matrix_init_scale() cairo.Matrix(xx=xx,yy=yy)
* cairo_matrix_init_rotate() cairo.Matrix.init_rotate(radians)
*/
- {"init_rotate", (PyCFunction)matrix_init_rotate,
+ {"init_rotate", (PyCFunction)matrix_init_rotate,
METH_VARARGS | METH_CLASS },
{"invert", (PyCFunction)matrix_invert, METH_NOARGS },
{"rotate", (PyCFunction)matrix_rotate, METH_VARARGS },
@@ -313,7 +313,7 @@
};
PyTypeObject PycairoMatrix_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.Matrix", /* tp_name */
sizeof(PycairoMatrix), /* tp_basicsize */
Index: pycairo-path.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-path.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pycairo-path.c 14 Jun 2005 04:02:58 -0000 1.6
+++ pycairo-path.c 18 Aug 2005 15:21:20 -0000 1.7
@@ -1,4 +1,4 @@
-/* -*- mode: C; c-basic-offset: 4 -*-
+/* -*- mode: C; c-basic-offset: 4 -*-
*
* Pycairo - Python bindings for cairo
*
@@ -117,7 +117,7 @@
switch (data->header.type) {
case CAIRO_PATH_MOVE_TO:
- PyOS_snprintf(buf, sizeof(buf), "move_to %f %f",
+ PyOS_snprintf(buf, sizeof(buf), "move_to %f %f",
data[1].point.x, data[1].point.y);
s = PyString_FromString(buf);
if (!s)
@@ -129,7 +129,7 @@
break;
case CAIRO_PATH_LINE_TO:
- PyOS_snprintf(buf, sizeof(buf), "line_to %f %f",
+ PyOS_snprintf(buf, sizeof(buf), "line_to %f %f",
data[1].point.x, data[1].point.y);
s = PyString_FromString(buf);
if (!s)
@@ -141,7 +141,7 @@
break;
case CAIRO_PATH_CURVE_TO:
- PyOS_snprintf(buf, sizeof(buf), "curve_to %f %f %f %f %f %f",
+ PyOS_snprintf(buf, sizeof(buf), "curve_to %f %f %f %f %f %f",
data[1].point.x, data[1].point.y,
data[2].point.x, data[2].point.y,
data[3].point.x, data[3].point.y);
@@ -181,7 +181,7 @@
PyTypeObject PycairoPath_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.Path", /* tp_name */
sizeof(PycairoPath), /* tp_basicsize */
@@ -304,7 +304,7 @@
}
static PyTypeObject PycairoPathiter_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.Pathiter", /* tp_name */
sizeof(PycairoPathiter), /* tp_basicsize */
Index: pycairo-pattern.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-pattern.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- pycairo-pattern.c 14 Jun 2005 04:02:58 -0000 1.25
+++ pycairo-pattern.c 18 Aug 2005 15:21:20 -0000 1.26
@@ -1,4 +1,4 @@
-/* -*- mode: C; c-basic-offset: 4 -*-
+/* -*- mode: C; c-basic-offset: 4 -*-
*
* Pycairo - Python bindings for cairo
*
@@ -94,7 +94,7 @@
PycairoSurface *s;
cairo_pattern_t *pattern;
- if (!PyArg_ParseTuple (args, "O!:Pattern.create_for_surface",
+ if (!PyArg_ParseTuple (args, "O!:Pattern.create_for_surface",
&PycairoSurface_Type, &s))
return NULL;
@@ -107,8 +107,8 @@
{
double x0, y0, x1, y1;
cairo_pattern_t *pattern;
-
- if (!PyArg_ParseTuple(args, "dddd:Pattern.create_linear",
+
+ if (!PyArg_ParseTuple(args, "dddd:Pattern.create_linear",
&x0, &y0, &x1, &y1))
return NULL;
@@ -122,11 +122,11 @@
cairo_pattern_t *pattern;
double cx0, cy0, radius0, cx1, cy1, radius1;
- if (!PyArg_ParseTuple(args, "dddddd:Pattern.create_radial",
+ if (!PyArg_ParseTuple(args, "dddddd:Pattern.create_radial",
&cx0, &cy0, &radius0, &cx1, &cy1, &radius1))
return NULL;
- pattern = cairo_pattern_create_radial (cx0, cy0, radius0,
+ pattern = cairo_pattern_create_radial (cx0, cy0, radius0,
cx1, cy1, radius1);
return PycairoPattern_FromPattern (pattern);
}
@@ -155,7 +155,7 @@
&offset, &red, &green, &blue, &alpha))
return NULL;
- cairo_pattern_add_color_stop_rgba (o->pattern, offset, red,
+ cairo_pattern_add_color_stop_rgba (o->pattern, offset, red,
green, blue, alpha);
if (Pycairo_Check_Status (cairo_pattern_status (o->pattern)))
return NULL;
@@ -189,11 +189,11 @@
if (!PyArg_ParseTuple(args, "i:Pattern.set_extend", &extend))
return NULL;
-
+
cairo_pattern_set_extend (o->pattern, extend);
Py_RETURN_NONE;
}
-
+
static PyObject *
pattern_set_filter (PycairoPattern *o, PyObject *args)
{
@@ -205,7 +205,7 @@
cairo_pattern_set_filter (o->pattern, filter);
Py_RETURN_NONE;
}
-
+
static PyObject *
pattern_set_matrix (PycairoPattern *o, PyObject *args)
{
@@ -227,15 +227,15 @@
* cairo_pattern_status()
* - not needed since Pycairo handles status checking
*/
- {"add_color_stop_rgb",(PyCFunction)pattern_add_color_stop_rgb,
+ {"add_color_stop_rgb",(PyCFunction)pattern_add_color_stop_rgb,
METH_VARARGS },
- {"add_color_stop_rgba",(PyCFunction)pattern_add_color_stop_rgba,
+ {"add_color_stop_rgba",(PyCFunction)pattern_add_color_stop_rgba,
METH_VARARGS },
- {"create_for_surface",(PyCFunction)pattern_create_for_surface,
+ {"create_for_surface",(PyCFunction)pattern_create_for_surface,
METH_VARARGS | METH_CLASS },
- {"create_linear", (PyCFunction)pattern_create_linear,
+ {"create_linear", (PyCFunction)pattern_create_linear,
METH_VARARGS | METH_CLASS },
- {"create_radial", (PyCFunction)pattern_create_radial,
+ {"create_radial", (PyCFunction)pattern_create_radial,
METH_VARARGS | METH_CLASS },
{"get_extend", (PyCFunction)pattern_get_extend, METH_NOARGS },
{"get_filter", (PyCFunction)pattern_get_filter, METH_NOARGS },
@@ -247,7 +247,7 @@
};
PyTypeObject PycairoPattern_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.Pattern", /* tp_name */
sizeof(PycairoPattern), /* tp_basicsize */
Index: pycairo-surface.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-surface.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- pycairo-surface.c 9 Aug 2005 10:54:44 -0000 1.52
+++ pycairo-surface.c 18 Aug 2005 15:21:20 -0000 1.53
@@ -231,7 +231,7 @@
PyTypeObject PycairoSurface_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.Surface", /* tp_name */
sizeof(PycairoSurface), /* tp_basicsize */
@@ -492,7 +492,7 @@
PyTypeObject PycairoImageSurface_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.ImageSurface", /* tp_name */
sizeof(PycairoImageSurface), /* tp_basicsize */
@@ -584,7 +584,7 @@
};
PyTypeObject PycairoPDFSurface_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.PDFSurface", /* tp_name */
sizeof(PycairoPDFSurface), /* tp_basicsize */
@@ -677,7 +677,7 @@
};
PyTypeObject PycairoPSSurface_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.PSSurface", /* tp_name */
sizeof(PycairoPSSurface), /* tp_basicsize */
@@ -755,7 +755,7 @@
};
PyTypeObject PycairoWin32Surface_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"cairo.Win32Surface", /* tp_name */
sizeof(PycairoWin32Surface), /* tp_basicsize */
More information about the cairo-commit
mailing list