[cairo-commit] pycairo/cairo pycairo-context.c,1.19,1.20

Steve Chaplin commit at pdx.freedesktop.org
Mon Mar 14 08:43:43 PST 2005


Committed by: stevech1097

Update of /cvs/cairo/pycairo/cairo
In directory gabe:/tmp/cvs-serv2475/cairo

Modified Files:
	pycairo-context.c 
Log Message:
SC 2005/03/14

Index: pycairo-context.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-context.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- pycairo-context.c	10 Mar 2005 08:29:52 -0000	1.19
+++ pycairo-context.c	14 Mar 2005 16:43:41 -0000	1.20
@@ -885,11 +885,11 @@
 }
 
 static PyObject *
-pycairo_current_font_extents(PyCairoContext *self)
+pycairo_get_font_extents(PyCairoContext *self)
 {
     cairo_font_extents_t extents;
 
-    cairo_current_font_extents(self->ctx, &extents);
+    cairo_get_font_extents(self->ctx, &extents);
     if (pycairo_check_status(cairo_status(self->ctx)))
 	return NULL;
     return Py_BuildValue("(ddddd)", extents.ascent, extents.descent, extents.height, extents.max_x_advance, extents.max_y_advance);
@@ -912,11 +912,11 @@
 }
 
 static PyObject *
-pycairo_current_font(PyCairoContext *self)
+pycairo_get_font(PyCairoContext *self)
 {
     cairo_font_t *font;
 
-    font = cairo_current_font(self->ctx);
+    font = cairo_get_font(self->ctx);
     if (!font){
 	pycairo_check_status(cairo_status(self->ctx));
 	return NULL;
@@ -926,89 +926,89 @@
 }
 
 static PyObject *
-pycairo_current_operator(PyCairoContext *self)
+pycairo_get_operator(PyCairoContext *self)
 {
-    return PyInt_FromLong(cairo_current_operator(self->ctx));
+    return PyInt_FromLong(cairo_get_operator(self->ctx));
 }
 
 static PyObject *
-pycairo_current_rgb_color(PyCairoContext *self)
+pycairo_get_rgb_color(PyCairoContext *self)
 {
     double red, green, blue;
 
-    cairo_current_rgb_color(self->ctx, &red, &green, &blue);
+    cairo_get_rgb_color(self->ctx, &red, &green, &blue);
     return Py_BuildValue("(ddd)", red, green, blue);
 }
 
 static PyObject *
-pycairo_current_alpha(PyCairoContext *self)
+pycairo_get_alpha(PyCairoContext *self)
 {
-    return PyFloat_FromDouble(cairo_current_alpha(self->ctx));
+    return PyFloat_FromDouble(cairo_get_alpha(self->ctx));
 }
 
 static PyObject *
-pycairo_current_tolerance(PyCairoContext *self)
+pycairo_get_tolerance(PyCairoContext *self)
 {
-    return PyFloat_FromDouble(cairo_current_tolerance(self->ctx));
+    return PyFloat_FromDouble(cairo_get_tolerance(self->ctx));
 }
 
 static PyObject *
-pycairo_current_point(PyCairoContext *self)
+pycairo_get_current_point(PyCairoContext *self)
 {
     double x, y;
 
-    cairo_current_point(self->ctx, &x, &y);
+    cairo_get_current_point(self->ctx, &x, &y);
     return Py_BuildValue("(dd)", x, y);
 }
 
 static PyObject *
-pycairo_current_fill_rule(PyCairoContext *self)
+pycairo_get_fill_rule(PyCairoContext *self)
 {
-    return PyInt_FromLong(cairo_current_fill_rule(self->ctx));
+    return PyInt_FromLong(cairo_get_fill_rule(self->ctx));
 }
 
 static PyObject *
-pycairo_current_line_width(PyCairoContext *self)
+pycairo_get_line_width(PyCairoContext *self)
 {
-    return PyFloat_FromDouble(cairo_current_line_width(self->ctx));
+    return PyFloat_FromDouble(cairo_get_line_width(self->ctx));
 }
 
 static PyObject *
-pycairo_current_line_cap(PyCairoContext *self)
+pycairo_get_line_cap(PyCairoContext *self)
 {
-    return PyInt_FromLong(cairo_current_line_cap(self->ctx));
+    return PyInt_FromLong(cairo_get_line_cap(self->ctx));
 }
 
 static PyObject *
-pycairo_current_line_join(PyCairoContext *self)
+pycairo_get_line_join(PyCairoContext *self)
 {
-    return PyInt_FromLong(cairo_current_line_join(self->ctx));
+    return PyInt_FromLong(cairo_get_line_join(self->ctx));
 }
 
 static PyObject *
-pycairo_current_miter_limit(PyCairoContext *self)
+pycairo_get_miter_limit(PyCairoContext *self)
 {
-    return PyFloat_FromDouble(cairo_current_miter_limit(self->ctx));
+    return PyFloat_FromDouble(cairo_get_miter_limit(self->ctx));
 }
 
 static PyObject *
-pycairo_current_matrix(PyCairoContext *self)
+pycairo_get_matrix(PyCairoContext *self)
 {
     cairo_matrix_t *matrix;
 
     matrix = cairo_matrix_create();
     if (!matrix)
 	return PyErr_NoMemory();
-    cairo_current_matrix(self->ctx, matrix);
+    cairo_get_matrix(self->ctx, matrix);
     return pycairo_matrix_wrap(matrix);
 }
 
 static PyObject *
-pycairo_current_target_surface(PyCairoContext *self)
+pycairo_get_target_surface(PyCairoContext *self)
 {
     cairo_surface_t *surface;
 
-    surface = cairo_current_target_surface(self->ctx);
+    surface = cairo_get_target_surface(self->ctx);
     if (!surface)
 	Py_RETURN_NONE;
 
@@ -1017,17 +1017,17 @@
 }
 
 static PyObject *
-pycairo_current_pattern(PyCairoContext *self)
+pycairo_get_pattern(PyCairoContext *self)
 {
     cairo_pattern_t *pattern;
 
-    pattern = cairo_current_pattern(self->ctx);
+    pattern = cairo_get_pattern(self->ctx);
     if (pattern)
 	return pycairo_pattern_wrap(pattern);
     Py_RETURN_NONE;
 }
 
-/* struct and wrappers for cairo_current_path() */ 
+/* struct and wrappers for cairo_get_path() */ 
 typedef struct {
 	PyObject* move_to;
 	PyObject* line_to;
@@ -1088,11 +1088,11 @@
 }
 
 static PyObject *
-pycairo_current_path(PyCairoContext *self, PyObject *args)
+pycairo_get_path(PyCairoContext *self, PyObject *args)
 {
     py_path_callbacks callbacks;
 
-    if(!PyArg_ParseTuple(args, "OOOO:Context.current_path_flat",
+    if(!PyArg_ParseTuple(args, "OOOO:Context.get_path_flat",
 			  &callbacks.move_to, &callbacks.line_to, &callbacks.curve_to, &callbacks.close_path))
 	return NULL;
 
@@ -1113,18 +1113,18 @@
 	return NULL;
     }
 
-    cairo_current_path(self->ctx, py_wrapper_move_to, py_wrapper_line_to, py_wrapper_curve_to, py_wrapper_close_path, &callbacks);
+    cairo_get_path(self->ctx, py_wrapper_move_to, py_wrapper_line_to, py_wrapper_curve_to, py_wrapper_close_path, &callbacks);
     if(PyErr_Occurred() || pycairo_check_status(cairo_status(self->ctx)))
 	return NULL;
     Py_RETURN_NONE;
 }
 
 static PyObject *
-pycairo_current_path_flat(PyCairoContext *self, PyObject *args)
+pycairo_get_path_flat(PyCairoContext *self, PyObject *args)
 {
     py_path_callbacks callbacks;
 
-    if(!PyArg_ParseTuple(args, "OOO:Context.current_path_flat",
+    if(!PyArg_ParseTuple(args, "OOO:Context.get_path_flat",
 			  &callbacks.move_to, &callbacks.line_to, &callbacks.close_path))
 	return NULL;
 
@@ -1141,42 +1141,45 @@
 	return NULL;
     }
 
-    cairo_current_path_flat(self->ctx, py_wrapper_move_to, py_wrapper_line_to, py_wrapper_close_path, &callbacks);
+    cairo_get_path_flat(self->ctx, py_wrapper_move_to, py_wrapper_line_to, py_wrapper_close_path, &callbacks);
     if(PyErr_Occurred() || pycairo_check_status(cairo_status(self->ctx)))
 	return NULL;
     Py_RETURN_NONE;
 }
 
 static PyMethodDef pycairo_methods[] = {
-    { "arc", (PyCFunction)pycairo_arc, METH_VARARGS },
+    /* append_path_data */
+    { "arc",          (PyCFunction)pycairo_arc, METH_VARARGS },
     { "arc_negative", (PyCFunction)pycairo_arc_negative, METH_VARARGS },
-    { "clip", (PyCFunction)pycairo_clip, METH_NOARGS },
-    { "close_path", (PyCFunction)pycairo_close_path, METH_NOARGS },
+    { "clip",         (PyCFunction)pycairo_clip, METH_NOARGS },
+    { "close_path",   (PyCFunction)pycairo_close_path, METH_NOARGS },
     { "concat_matrix", (PyCFunction)pycairo_concat_matrix, METH_VARARGS },
-    { "copy", (PyCFunction)pycairo_copy, METH_VARARGS },
-    { "copy_page", (PyCFunction)pycairo_copy_page, METH_NOARGS },
-    { "current_path", (PyCFunction)pycairo_current_path, METH_VARARGS },
-    { "current_path_flat", (PyCFunction)pycairo_current_path_flat, METH_VARARGS },
-    { "curve_to", (PyCFunction)pycairo_curve_to, METH_VARARGS },
+    { "copy",         (PyCFunction)pycairo_copy, METH_VARARGS },
+    { "copy_page",    (PyCFunction)pycairo_copy_page, METH_NOARGS },
+    /* copy_path_data */
+    /* copy_path_data_flat */
+    { "curve_to",     (PyCFunction)pycairo_curve_to, METH_VARARGS },
     { "default_matrix", (PyCFunction)pycairo_default_matrix, METH_NOARGS },
-    { "fill", (PyCFunction)pycairo_fill, METH_NOARGS },
+    { "fill",         (PyCFunction)pycairo_fill, METH_NOARGS },
+    { "get_path",     (PyCFunction)pycairo_get_path, METH_VARARGS },
+    { "get_path_flat", (PyCFunction)pycairo_get_path_flat, METH_VARARGS },
     /* TODO: { "glyph_extents", (PyCFunction)pycairo_glyph_extents, METH_NOARGS }, */
     /* TODO: { "glyph_path", (PyCFunction)pycairo_glyph_path, METH_VARARGS }, */
     { "identity_matrix", (PyCFunction)pycairo_identity_matrix, METH_NOARGS },
-    { "in_fill", (PyCFunction)pycairo_in_fill, METH_VARARGS },
-    { "in_stroke", (PyCFunction)pycairo_in_stroke, METH_VARARGS },
-    { "init_clip", (PyCFunction)pycairo_init_clip, METH_NOARGS },
+    { "in_fill",      (PyCFunction)pycairo_in_fill, METH_VARARGS },
+    { "in_stroke",    (PyCFunction)pycairo_in_stroke, METH_VARARGS },
+    { "init_clip",    (PyCFunction)pycairo_init_clip, METH_NOARGS },
     { "inverse_transform_distance",
       (PyCFunction)pycairo_inverse_transform_distance, METH_VARARGS },
     { "inverse_transform_point", (PyCFunction)pycairo_inverse_transform_point,
       METH_VARARGS },
-    { "line_to", (PyCFunction)pycairo_line_to, METH_VARARGS },
-    { "move_to", (PyCFunction)pycairo_move_to, METH_VARARGS },
-    { "new_path", (PyCFunction)pycairo_new_path, METH_NOARGS },
-    { "rectangle", (PyCFunction)pycairo_rectangle, METH_VARARGS },
+    { "line_to",      (PyCFunction)pycairo_line_to, METH_VARARGS },
+    { "move_to",      (PyCFunction)pycairo_move_to, METH_VARARGS },
+    { "new_path",     (PyCFunction)pycairo_new_path, METH_NOARGS },
+    { "rectangle",    (PyCFunction)pycairo_rectangle, METH_VARARGS },
     { "rel_curve_to", (PyCFunction)pycairo_rel_curve_to, METH_VARARGS },
-    { "rel_line_to", (PyCFunction)pycairo_rel_line_to, METH_VARARGS },
-    { "rel_move_to", (PyCFunction)pycairo_rel_move_to, METH_VARARGS },
+    { "rel_line_to",  (PyCFunction)pycairo_rel_line_to, METH_VARARGS },
+    { "rel_move_to",  (PyCFunction)pycairo_rel_move_to, METH_VARARGS },
     { "restore", (PyCFunction)pycairo_restore, METH_NOARGS },
     { "rotate", (PyCFunction)pycairo_rotate, METH_VARARGS },
     { "save", (PyCFunction)pycairo_save, METH_NOARGS },
@@ -1223,23 +1226,23 @@
 };
 
 static PyGetSetDef pycairo_getsets[] = {
-    { "alpha",          (getter)pycairo_current_alpha,        (setter)0 },
-    { "fill_extents",   (getter)pycairo_fill_extents,         (setter)0 },
-    { "fill_rule",      (getter)pycairo_current_fill_rule,    (setter)0 },
-    { "font",           (getter)pycairo_current_font,         (setter)0 },
-    { "font_extents",   (getter)pycairo_current_font_extents, (setter)0 },
-    { "line_cap",       (getter)pycairo_current_line_cap,     (setter)0 },
-    { "line_join",      (getter)pycairo_current_line_join,    (setter)0 },
-    { "line_width",     (getter)pycairo_current_line_width,   (setter)0 },
-    { "matrix",         (getter)pycairo_current_matrix,       (setter)0 },
-    { "miter_limit",    (getter)pycairo_current_miter_limit,  (setter)0 },
-    { "operator",       (getter)pycairo_current_operator,     (setter)0 },
-    { "pattern",        (getter)pycairo_current_pattern,      (setter)0 },
-    { "point",          (getter)pycairo_current_point,        (setter)0 },
-    { "rgb_color",      (getter)pycairo_current_rgb_color,    (setter)0 },
-    { "stroke_extents", (getter)pycairo_stroke_extents,       (setter)0 },
-    { "target_surface", (getter)pycairo_current_target_surface, (setter)0 },
-    { "tolerance",      (getter)pycairo_current_tolerance,    (setter)0 },
+    { "alpha",          (getter)pycairo_get_alpha,        (setter)0 },
+    { "fill_extents",   (getter)pycairo_fill_extents,     (setter)0 },
+    { "fill_rule",      (getter)pycairo_get_fill_rule,    (setter)0 },
+    { "font",           (getter)pycairo_get_font,         (setter)0 },
+    { "font_extents",   (getter)pycairo_get_font_extents, (setter)0 },
+    { "line_cap",       (getter)pycairo_get_line_cap,     (setter)0 },
+    { "line_join",      (getter)pycairo_get_line_join,    (setter)0 },
+    { "line_width",     (getter)pycairo_get_line_width,   (setter)0 },
+    { "matrix",         (getter)pycairo_get_matrix,       (setter)0 },
+    { "miter_limit",    (getter)pycairo_get_miter_limit,  (setter)0 },
+    { "operator",       (getter)pycairo_get_operator,     (setter)0 },
+    { "pattern",        (getter)pycairo_get_pattern,      (setter)0 },
+    { "point",          (getter)pycairo_get_current_point, (setter)0 },
+    { "rgb_color",      (getter)pycairo_get_rgb_color,    (setter)0 },
+    { "stroke_extents", (getter)pycairo_stroke_extents,   (setter)0 },
+    { "target_surface", (getter)pycairo_get_target_surface, (setter)0 },
+    { "tolerance",      (getter)pycairo_get_tolerance,    (setter)0 },
     { NULL, (getter)0, (setter)0 }
 };
 




More information about the cairo-commit mailing list