You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 2.7.5 (default, Aug 22 2013, 09:31:58)
[GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import Gdk
>>> import cairocffi as cairo
>>> surface = cairo.ImageSurface(0,100,100)
>>> Gdk.cairo_region_create_from_surface(surface)
Segmentation fault (core dumped)
Would be great to have cairo_region_t support, e.g. for input_shape_combine_region.
The text was updated successfully, but these errors were encountered:
First, cairocffi does not support cairo_region_t and related functions. It’s not hard to add, just a bit tedious (as I want everything to be tested and documented.)
PyGobject (that you’re using to access GTK) doesn’t support cairocffi. One way to fix this is Pycairo C API support #18, emulate Pycairo’s C API in cairocffi. This is quite fragile and I’d rather do the alternative: change PyGObject to support cairocffi explicitly: https://bugzilla.gnome.org/show_bug.cgi?id=707196
Finally, PyGObject does not support cairo_region_t, which is the bug you linked. This requires either a new pycairo release, (which is unlikely as the project is dead) or fixing the two points above.
So this issue is about the first point of my previous message: cairo Regions in cairocffi. If someone is interested in doing this work, I’d be happy to provide guidance.
cairocffi does not yet support cairo Regions: http://cairographics.org/manual/cairo-Regions.html
Originally reported as:
Support for cairo_region_t doesn't seem to be there (segfault)
The problem described here for pycairo doesn't seem to be resolved when using cairocffi: https://bugzilla.gnome.org/show_bug.cgi?id=667959
Just try (same with Python 3)
Would be great to have cairo_region_t support, e.g. for input_shape_combine_region.
The text was updated successfully, but these errors were encountered: