[cairo-commit] pycairo/cairo pycairo-context.c,1.22,1.23

Steve Chaplin commit at pdx.freedesktop.org
Mon Mar 21 19:33:17 PST 2005


Committed by: stevech1097

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

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

Index: pycairo-context.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-context.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- pycairo-context.c	18 Mar 2005 15:30:28 -0000	1.22
+++ pycairo-context.c	22 Mar 2005 03:33:15 -0000	1.23
@@ -272,9 +272,9 @@
 }
 
 static PyObject *
-pycairo_init_clip(PyCairoContext *self)
+pycairo_reset_clip(PyCairoContext *self)
 {
-    cairo_init_clip(self->ctx);
+    cairo_reset_clip(self->ctx);
     if (pycairo_check_status(cairo_status(self->ctx)))
 	return NULL;
     Py_RETURN_NONE;
@@ -498,15 +498,15 @@
 }
 
 static PyObject *
-pycairo_concat_matrix(PyCairoContext *self, PyObject *args)
+pycairo_transform(PyCairoContext *self, PyObject *args)
 {
     PyCairoMatrix *matrix;
 
-    if (!PyArg_ParseTuple(args, "O!:Context.concat_matrix",
+    if (!PyArg_ParseTuple(args, "O!:Context.transform",
 			  &PyCairoMatrix_Type, &matrix))
 	return NULL;
 
-    cairo_concat_matrix(self->ctx, matrix->matrix);
+    cairo_transform(self->ctx, matrix->matrix);
     if (pycairo_check_status(cairo_status(self->ctx)))
 	return NULL;
     Py_RETURN_NONE;
@@ -546,57 +546,57 @@
 }
 
 static PyObject *
-pycairo_transform_distance(PyCairoContext *self, PyObject *args)
+pycairo_user_to_device_distance(PyCairoContext *self, PyObject *args)
 {
     double dx, dy;
 
-    if (!PyArg_ParseTuple(args, "dd:Context.transform_distance", &dx, &dy))
+    if (!PyArg_ParseTuple(args, "dd:Context.user_to_device_distance", &dx, &dy))
 	return NULL;
 
-    cairo_transform_distance(self->ctx, &dx, &dy);
+    cairo_user_to_device_distance(self->ctx, &dx, &dy);
     if (pycairo_check_status(cairo_status(self->ctx)))
 	return NULL;
     return Py_BuildValue("(dd)", dx, dy);
 }
 
 static PyObject *
-pycairo_transform_point(PyCairoContext *self, PyObject *args)
+pycairo_user_to_device(PyCairoContext *self, PyObject *args)
 {
     double x, y;
 
-    if (!PyArg_ParseTuple(args, "dd:Context.transform_point", &x, &y))
+    if (!PyArg_ParseTuple(args, "dd:Context.user_to_device", &x, &y))
 	return NULL;
 
-    cairo_transform_point(self->ctx, &x, &y);
+    cairo_user_to_device(self->ctx, &x, &y);
     if (pycairo_check_status(cairo_status(self->ctx)))
 	return NULL;
     return Py_BuildValue("(dd)", x, y);
 }
 
 static PyObject *
-pycairo_inverse_transform_distance(PyCairoContext *self, PyObject *args)
+pycairo_device_to_user_distance(PyCairoContext *self, PyObject *args)
 {
     double dx, dy;
 
-    if (!PyArg_ParseTuple(args, "dd:Context.inverse_transform_distance",
+    if (!PyArg_ParseTuple(args, "dd:Context.device_to_user_distance",
 			  &dx, &dy))
 	return NULL;
 
-    cairo_inverse_transform_distance(self->ctx, &dx, &dy);
+    cairo_device_to_user_distance(self->ctx, &dx, &dy);
     if (pycairo_check_status(cairo_status(self->ctx)))
 	return NULL;
     return Py_BuildValue("(dd)", dx, dy);
 }
 
 static PyObject *
-pycairo_inverse_transform_point(PyCairoContext *self, PyObject *args)
+pycairo_device_to_user(PyCairoContext *self, PyObject *args)
 {
     double x, y;
 
-    if (!PyArg_ParseTuple(args, "dd:Context.inverse_transform_point", &x, &y))
+    if (!PyArg_ParseTuple(args, "dd:Context.device_to_user", &x, &y))
 	return NULL;
 
-    cairo_inverse_transform_point(self->ctx, &x, &y);
+    cairo_device_to_user(self->ctx, &x, &y);
     if (pycairo_check_status(cairo_status(self->ctx)))
 	return NULL;
     return Py_BuildValue("(dd)", x, y);
@@ -1146,81 +1146,80 @@
 
 static PyMethodDef pycairo_methods[] = {
     /* 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 },
-    { "concat_matrix", (PyCFunction)pycairo_concat_matrix, METH_VARARGS },
-    { "copy",         (PyCFunction)pycairo_copy,          METH_VARARGS },
-    { "copy_page",    (PyCFunction)pycairo_copy_page,     METH_NOARGS },
+    { "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 },
+    { "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 },
-    { "get_path",     (PyCFunction)pycairo_get_path,      METH_VARARGS },
+    { "curve_to",      (PyCFunction)pycairo_curve_to,      METH_VARARGS },
+    { "default_matrix",(PyCFunction)pycairo_default_matrix,METH_NOARGS },
+    { "device_to_user",(PyCFunction)pycairo_device_to_user,METH_VARARGS },
+    { "device_to_user_distance",
+      (PyCFunction)pycairo_device_to_user_distance,        METH_VARARGS },
+    { "fill",          (PyCFunction)pycairo_fill,          METH_NOARGS },
+    { "get_path",      (PyCFunction)pycairo_get_path,      METH_VARARGS },
     { "get_path_flat", (PyCFunction)pycairo_get_path_flat, METH_VARARGS },
     /* glyph_extents */
     /* glyph_path */
-    { "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 },
-    { "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 },
-    { "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 },
-    { "restore",      (PyCFunction)pycairo_restore,       METH_NOARGS },
-    { "rotate",       (PyCFunction)pycairo_rotate,        METH_VARARGS },
-    { "save",         (PyCFunction)pycairo_save,          METH_NOARGS },
-    { "scale",        (PyCFunction)pycairo_scale,         METH_VARARGS },
-    { "scale_font",   (PyCFunction)pycairo_scale_font,    METH_VARARGS },
-    { "select_font",  (PyCFunction)pycairo_select_font,   METH_VARARGS },
-    { "set_alpha",    (PyCFunction)pycairo_set_alpha,     METH_VARARGS },
-    { "set_dash",     (PyCFunction)pycairo_set_dash,      METH_VARARGS },
-    { "set_fill_rule", (PyCFunction)pycairo_set_fill_rule,METH_VARARGS },
-    { "set_font",     (PyCFunction)pycairo_set_font,      METH_VARARGS },
-    { "set_line_cap", (PyCFunction)pycairo_set_line_cap,  METH_VARARGS },
-    { "set_line_join",(PyCFunction)pycairo_set_line_join, 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 },
+    { "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 },
+    { "reset_clip",    (PyCFunction)pycairo_reset_clip,    METH_NOARGS },
+    { "restore",       (PyCFunction)pycairo_restore,       METH_NOARGS },
+    { "rotate",        (PyCFunction)pycairo_rotate,        METH_VARARGS },
+    { "save",          (PyCFunction)pycairo_save,          METH_NOARGS },
+    { "scale",         (PyCFunction)pycairo_scale,         METH_VARARGS },
+    { "scale_font",    (PyCFunction)pycairo_scale_font,    METH_VARARGS },
+    { "select_font",   (PyCFunction)pycairo_select_font,   METH_VARARGS },
+    { "set_alpha",     (PyCFunction)pycairo_set_alpha,     METH_VARARGS },
+    { "set_dash",      (PyCFunction)pycairo_set_dash,      METH_VARARGS },
+    { "set_fill_rule", (PyCFunction)pycairo_set_fill_rule, METH_VARARGS },
+    { "set_font",      (PyCFunction)pycairo_set_font,      METH_VARARGS },
+    { "set_line_cap",  (PyCFunction)pycairo_set_line_cap,  METH_VARARGS },
+    { "set_line_join", (PyCFunction)pycairo_set_line_join, METH_VARARGS },
     { "set_line_width",(PyCFunction)pycairo_set_line_width,METH_VARARGS },
-    { "set_matrix",   (PyCFunction)pycairo_set_matrix,    METH_VARARGS },
-    { "set_miter_limit",(PyCFunction)pycairo_set_miter_limit, METH_VARARGS },
-    { "set_operator", (PyCFunction)pycairo_set_operator,  METH_VARARGS },
-    { "set_pattern",  (PyCFunction)pycairo_set_pattern,   METH_VARARGS },
-    { "set_rgb_color",(PyCFunction)pycairo_set_rgb_color, METH_VARARGS },
+    { "set_matrix",    (PyCFunction)pycairo_set_matrix,    METH_VARARGS },
+    { "set_miter_limit",(PyCFunction)pycairo_set_miter_limit,METH_VARARGS },
+    { "set_operator",  (PyCFunction)pycairo_set_operator,  METH_VARARGS },
+    { "set_pattern",   (PyCFunction)pycairo_set_pattern,   METH_VARARGS },
+    { "set_rgb_color", (PyCFunction)pycairo_set_rgb_color, METH_VARARGS },
 # if 0
 #ifdef CAIRO_HAS_PDF_SURFACE
     { "set_target_pdf",(PyCFunction)pycairo_set_target_pdf,METH_VARARGS},
 #endif
 # endif
 #ifdef CAIRO_HAS_PS_SURFACE
-    { "set_target_ps",(PyCFunction)pycairo_set_target_ps, METH_VARARGS},
+    { "set_target_ps", (PyCFunction)pycairo_set_target_ps, METH_VARARGS},
 #endif
 #ifdef CAIRO_HAS_PNG_SURFACE
     { "set_target_png",(PyCFunction)pycairo_set_target_png,METH_VARARGS },
 #endif
     { "set_target_surface",(PyCFunction)pycairo_set_target_surface,
       METH_VARARGS },
-    { "set_tolerance", (PyCFunction)pycairo_set_tolerance,METH_VARARGS },
+    { "set_tolerance", (PyCFunction)pycairo_set_tolerance, METH_VARARGS },
     /* show_glyphs */
-    { "show_page",    (PyCFunction)pycairo_show_page,     METH_NOARGS },
-    { "show_surface", (PyCFunction)pycairo_show_surface,  METH_VARARGS },
-    { "show_text",    (PyCFunction)pycairo_show_text,     METH_VARARGS },
-    { "stroke",       (PyCFunction)pycairo_stroke,        METH_NOARGS },
-    { "text_extents", (PyCFunction)pycairo_text_extents,  METH_VARARGS },
-    { "text_path",    (PyCFunction)pycairo_text_path,     METH_VARARGS },
+    { "show_page",     (PyCFunction)pycairo_show_page,     METH_NOARGS },
+    { "show_surface",  (PyCFunction)pycairo_show_surface,  METH_VARARGS },
+    { "show_text",     (PyCFunction)pycairo_show_text,     METH_VARARGS },
+    { "stroke",        (PyCFunction)pycairo_stroke,        METH_NOARGS },
+    { "text_extents",  (PyCFunction)pycairo_text_extents,  METH_VARARGS },
+    { "text_path",     (PyCFunction)pycairo_text_path,     METH_VARARGS },
+    { "transform",     (PyCFunction)pycairo_transform,     METH_VARARGS },
     { "transform_font",(PyCFunction)pycairo_transform_font,METH_VARARGS },
-    { "transform_point",(PyCFunction)pycairo_transform_point,METH_VARARGS },
-    { "transform_distance",(PyCFunction)pycairo_transform_distance,
+    { "translate",     (PyCFunction)pycairo_translate,     METH_VARARGS },
+    { "user_to_device",(PyCFunction)pycairo_user_to_device,METH_VARARGS },
+    { "user_to_device_distance",(PyCFunction)pycairo_user_to_device_distance,
       METH_VARARGS },
-    { "translate",    (PyCFunction)pycairo_translate,     METH_VARARGS },
     { NULL, NULL, 0 }
 };
 
@@ -1237,10 +1236,10 @@
     { "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 },
+    { "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 },
+    { "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