[cairo-commit] pycairo/cairo pycairo-context.c,1.60,1.61

Steve Chaplin commit at pdx.freedesktop.org
Mon Aug 8 05:16:37 PDT 2005


Committed by: stevech1097

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

Modified Files:
	pycairo-context.c 
Log Message:
'SC'

Index: pycairo-context.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-context.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- pycairo-context.c	1 Aug 2005 15:24:38 -0000	1.60
+++ pycairo-context.c	8 Aug 2005 12:16:35 -0000	1.61
@@ -1,4 +1,4 @@
-/* -*- mode: C; c-basic-offset: 4 -*- 
+/* -*- mode: C; c-basic-offset: 4 -*-
  *
  * Pycairo - Python bindings for cairo
  *
@@ -96,7 +96,7 @@
     PyObject *o;
     PycairoSurface *s;
 
-    if (!PyArg_ParseTuple(args, "O!:Context.__new__", 
+    if (!PyArg_ParseTuple(args, "O!:Context.__new__",
 			  &PycairoSurface_Type, &s))
 	return NULL;
 
@@ -118,7 +118,7 @@
 {
     PycairoPath *p;
 
-    if (!PyArg_ParseTuple(args, "O!:Context.append_path", 
+    if (!PyArg_ParseTuple(args, "O!:Context.append_path",
 			  &PycairoPath_Type, &p))
 	return NULL;
 
@@ -240,7 +240,7 @@
 {
     double dx, dy;
 
-    if (!PyArg_ParseTuple (args, "dd:Context.device_to_user_distance", 
+    if (!PyArg_ParseTuple (args, "dd:Context.device_to_user_distance",
 			   &dx, &dy))
 	return NULL;
 
@@ -286,7 +286,7 @@
     cairo_font_extents (o->ctx, &e);
     if (Pycairo_Check_Status (cairo_status (o->ctx)))
 	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);
 }
 
@@ -308,11 +308,6 @@
 pycairo_get_font_face (PycairoContext *o)
 {
     cairo_font_face_t *font_face = cairo_get_font_face (o->ctx);
-    /* remove this block when cairo_get_font_face returns _cairo_font_face_nil;*/
-    if (!font_face) { 
-	Pycairo_Check_Status (cairo_status (o->ctx));
-	return NULL;
-    }
     cairo_font_face_reference (font_face);
     return PycairoFontFace_FromFontFace (font_face);
 }
@@ -473,7 +468,7 @@
     PycairoSurface *s;
     double surface_x = 0.0, surface_y = 0.0;
 
-    if (!PyArg_ParseTuple (args, "O!|dd:Context.mask_surface", 
+    if (!PyArg_ParseTuple (args, "O!|dd:Context.mask_surface",
 			   &PycairoSurface_Type, &s, &surface_x, &surface_y))
 	return NULL;
 
@@ -669,7 +664,7 @@
     if (!PyArg_ParseTuple (args, "O|d:Context.set_dash", &py_dashes, &offset))
 	return NULL;
 
-    py_dashes = PySequence_Fast (py_dashes, 
+    py_dashes = PySequence_Fast (py_dashes,
 				 "first argument must be a sequence");
     if (!py_dashes)
 	return NULL;
@@ -995,8 +990,8 @@
     cairo_text_extents (o->ctx, utf8, &extents);
     if (Pycairo_Check_Status (cairo_status (o->ctx)))
 	return NULL;
-    return Py_BuildValue("(dddddd)", extents.x_bearing, extents.y_bearing, 
-			 extents.width, extents.height, extents.x_advance, 
+    return Py_BuildValue("(dddddd)", extents.x_bearing, extents.y_bearing,
+			 extents.width, extents.height, extents.x_advance,
 			 extents.y_advance);
 }
 
@@ -1062,7 +1057,7 @@
 {
     double dx, dy;
 
-    if (!PyArg_ParseTuple (args, "dd:Context.user_to_device_distance", 
+    if (!PyArg_ParseTuple (args, "dd:Context.user_to_device_distance",
 		 	  &dx, &dy))
 	return NULL;
 
@@ -1151,7 +1146,7 @@
     {"set_source",      (PyCFunction)pycairo_set_source,     METH_VARARGS},
     {"set_source_rgb",  (PyCFunction)pycairo_set_source_rgb, METH_VARARGS},
     {"set_source_rgba", (PyCFunction)pycairo_set_source_rgba,METH_VARARGS},
-    {"set_source_surface",(PyCFunction)pycairo_set_source_surface,  
+    {"set_source_surface",(PyCFunction)pycairo_set_source_surface,
                                                              METH_VARARGS},
     {"set_tolerance",   (PyCFunction)pycairo_set_tolerance,  METH_VARARGS},
     /* show_glyphs - undocumented */




More information about the cairo-commit mailing list