cairo_font_options_set_antialias and some other font option stuff is missing bindings. Here's a patch for two of them: diff -u -d -r -N pycairo-1.0.2/cairo/pycairo-font.c pycairo-1.0.2-mod/cairo/pycairo-font.c --- pycairo-1.0.2/cairo/pycairo-font.c 2005-08-19 05:28:00.000000000 +0300 +++ pycairo-1.0.2-mod/cairo/pycairo-font.c 2006-01-21 21:11:45.000000000 +0200 @@ -349,6 +349,25 @@ return o; } +static PyObject * +font_options_get_antialias (PycairoFontOptions *o) +{ + int aa; + assert (o->font_options != NULL); + aa = cairo_font_options_get_antialias (o->font_options) + return PyInt_FromLong (aa); +} + +static PyObject * +font_options_set_antialias (PycairoFontOptions *o, PyObject *args) +{ + cairo_antialias_t aa; + assert (o->font_options != NULL); + if (!PyArg_ParseTuple(args, "i", &aa)) return NULL; + cairo_font_options_set_antialias(o->font_options, aa); + Py_INCREF(Py_None); + return Py_None; +} static PyMethodDef font_options_methods[] = { /* methods never exposed in a language binding: @@ -359,11 +378,12 @@ * copy * merge * equal (richcmp?) - * set/get_antialias * set/get_subpixel_order * set/get_hint_style * set/get_hint_metrics */ + {"get_antialias", (PyCFunction)font_options_get_antialias, METH_NOARGS}, + {"set_antialias", (PyCFunction)font_options_set_antialias, METH_VARARGS}, {NULL, NULL, 0, NULL}, };
Added missing bindings for cairo_font_options_set_antialias and some others: * cairo/cairomodule.c (init_cairo): Add cairo.SUBPIXEL_ORDER_*, cairo.HINT_STYLE_*, cairo.HINT_METRICS_* constants. * cairo/pycairo-font.c (font_options_get_antialias) (font_options_get_hint_metrics, font_options_get_hint_style) (font_options_get_subpixel_order, font_options_set_antialias) (font_options_set_hint_metrics, font_options_set_hint_style) (font_options_set_subpixel_order): new bindings, applied patch from raulir, with some changes, fixes bug #5689.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.