Kozea / cairocffi

CFFI-based cairo bindings for Python.
https://doc.courtbouillon.org/cairocffi
BSD 3-Clause "New" or "Revised" License
206 stars 53 forks source link

Support cairo Regions #19

Open tuxor1337 opened 10 years ago

tuxor1337 commented 10 years ago

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)

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.

SimonSapin commented 10 years ago

Hi. Three things are going on here:

SimonSapin commented 10 years ago

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.