diff options
author | Steve Chaplin <> | 2012-08-04 12:29:32 +0800 |
---|---|---|
committer | Steve Chaplin <> | 2012-08-04 12:29:32 +0800 |
commit | c55e63970befc87120ceacae5fc9ffba0881d33d (patch) | |
tree | d5c01141dd136e0cdec1a92134dc44079febc068 /src/context.c | |
parent | 9576b3d77034d91f456a5b199a9fc9cc2fde3c08 (diff) | |
download | pycairo-c55e63970befc87120ceacae5fc9ffba0881d33d.tar.gz |
New methods added:
cairo_in_clip
cairo_surface_create_for_rectangle
cairo_pdf_surface_restrict_to_version
cairo_pdf_version_to_string
New constants added:
cairo.PDF_VERSION_1_4
cairo.PDF_VERSION_1_5
Diffstat (limited to 'src/context.c')
-rw-r--r-- | src/context.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/context.c b/src/context.c index 9bee5d4..984cdfc 100644 --- a/src/context.c +++ b/src/context.c @@ -530,6 +530,20 @@ pycairo_identity_matrix (PycairoContext *o) { } static PyObject * +pycairo_in_clip (PycairoContext *o, PyObject *args) { + double x, y; + PyObject *result; + + if (!PyArg_ParseTuple (args, "dd:Context.in_clip", &x, &y)) + return NULL; + + result = cairo_in_clip (o->ctx, x, y) ? Py_True : Py_False; + RETURN_NULL_IF_CAIRO_CONTEXT_ERROR(o->ctx); + Py_INCREF(result); + return result; +} + +static PyObject * pycairo_in_fill (PycairoContext *o, PyObject *args) { double x, y; PyObject *result; @@ -1266,6 +1280,7 @@ static PyMethodDef pycairo_methods[] = { {"glyph_path", (PyCFunction)pycairo_glyph_path, METH_VARARGS}, {"has_current_point",(PyCFunction)pycairo_has_current_point, METH_NOARGS}, {"identity_matrix", (PyCFunction)pycairo_identity_matrix, METH_NOARGS}, + {"in_clip", (PyCFunction)pycairo_in_clip, METH_VARARGS}, {"in_fill", (PyCFunction)pycairo_in_fill, METH_VARARGS}, {"in_stroke", (PyCFunction)pycairo_in_stroke, METH_VARARGS}, {"line_to", (PyCFunction)pycairo_line_to, METH_VARARGS}, |