[cairo-commit] pycairo/cairo pycairo-pattern.c,1.35,1.36

Steve Chaplin commit at pdx.freedesktop.org
Wed Dec 27 15:02:13 PST 2006


Committed by: stevech1097

Update of /cvs/cairo/pycairo/cairo
In directory kemper:/tmp/cvs-serv6589/cairo

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

Index: pycairo-pattern.c
===================================================================
RCS file: /cvs/cairo/pycairo/cairo/pycairo-pattern.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- pycairo-pattern.c	27 Dec 2006 17:01:03 -0000	1.35
+++ pycairo-pattern.c	27 Dec 2006 23:02:08 -0000	1.36
@@ -110,7 +110,6 @@
     PyErr_SetString(PyExc_TypeError,
 		    "The Pattern type cannot be instantiated");
     return NULL;
-
 }
 
 static PyObject *
@@ -289,6 +288,15 @@
 }
 
 static PyObject *
+surface_pattern_get_surface (PycairoSurfacePattern *o)
+{
+    cairo_surface_t *surface;
+    cairo_pattern_get_surface (o->pattern, &surface);
+    return PycairoSurface_FromSurface (
+			       cairo_surface_reference (surface), NULL);
+}
+
+static PyObject *
 surface_pattern_set_extend (PycairoSurfacePattern *o, PyObject *args)
 {
     int extend;
@@ -315,6 +323,7 @@
 static PyMethodDef surface_pattern_methods[] = {
     {"get_extend",    (PyCFunction)surface_pattern_get_extend,  METH_NOARGS },
     {"get_filter",    (PyCFunction)surface_pattern_get_filter,  METH_NOARGS },
+    {"get_surface",   (PyCFunction)surface_pattern_get_surface, METH_NOARGS },
     {"set_extend",    (PyCFunction)surface_pattern_set_extend,  METH_VARARGS },
     {"set_filter",    (PyCFunction)surface_pattern_set_filter,  METH_VARARGS },
     {NULL, NULL, 0, NULL},
@@ -472,7 +481,17 @@
                cairo_pattern_create_linear (x0, y0, x1, y1));
 }
 
+static PyObject *
+linear_gradient_get_linear_points (PycairoLinearGradient *o)
+{
+    double x0, y0, x1, y1;
+    cairo_pattern_get_linear_points (o->pattern, &x0, &y0, &x1, &y1);
+    return Py_BuildValue("(dddd)", x0, y0, x1, y1);
+}
+
 static PyMethodDef linear_gradient_methods[] = {
+    {"get_linear_points", (PyCFunction)linear_gradient_get_linear_points,
+                                                                 METH_NOARGS },
     {NULL, NULL, 0, NULL},
 };
 
@@ -534,7 +553,18 @@
            cairo_pattern_create_radial (cx0, cy0, radius0, cx1, cy1, radius1));
 }
 
+static PyObject *
+radial_gradient_get_radial_circles (PycairoRadialGradient *o)
+{
+    double x0, y0, r0, x1, y1, r1;
+    cairo_pattern_get_radial_circles (o->pattern, &x0, &y0, &r0,
+				      &x1, &y1, &r1);
+    return Py_BuildValue("(dddddd)", x0, y0, r0, x1, y1, r1);
+}
+
 static PyMethodDef radial_gradient_methods[] = {
+    {"get_radial_circles", (PyCFunction)radial_gradient_get_radial_circles,
+                                                                 METH_NOARGS },
     {NULL, NULL, 0, NULL},
 };
 



More information about the cairo-commit mailing list