[cairo] Qahirah: A High-Level Cairo API Binding For Python 3
Bryce Harrington
bryce at osg.samsung.com
Fri Mar 6 16:03:50 PST 2015
On Sat, Mar 07, 2015 at 12:09:33PM +1300, Lawrence D'Oliveiro wrote:
> It seems like Pycairo <http://cairographics.org/pycairo/> has not had
> much TLC in over two years. Besides its incompleteness, it suffers
> inherent limitations from being written in C, which would not afflict a
> Python binding written in Python.
>
> So here is Qahirah <https://github.com/ldo/qahirah>, yet another Python
> binding for Cairo, this one concentrating specifically on Python 3.
> Being done in Python, I can go beyond the language limitations of C,
> which constrain Cairo itself. Thus, instead of doing separate
> calculations on x and y coordinates, I provide a Vector type, allowing
> you to do arithmetic along both coordinate axes in a single expression.
>
> Similarly, instead of always having to specify colours with separate R,
> G, B and A components, I define a Colour class, which allows you to
> work with colours freely in your choice of RGBA, HSVA, HLSA and YIQA
> spaces, courtesy of the standard Python colorsys module. Of course, all
> colours are automatically converted to RGBA form before being passed to
> Cairo.
>
> Other places where Qahirah offers capabilities going beyond Cairo
> itself are the Path and Matrix types. I also allow method-chaining for
> drawing calls.
>
> In terms of direct support for Cairo functionality, I would say it is
> already roughly at feature parity with Pycairo. Cairo features I have
> implemented that are not in Pycairo include access to FreeType fonts
> and mesh patterns. The main omissions from Qahirah at this point are
> regions and the GUI surface types.
>
> Some example scripts are here <https://github.com/ldo/qahirah_examples>.
Hi Lawrence,
Thanks for posting about this, and good to see a new python interface.
Have you looked at cairocffi?
https://pypi.python.org/pypi/cairocffi/
Does anyone know if Steve Chaplin is planning further development of
pycairo? If not, maybe we should consider a handoff of that project?
Bryce
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
More information about the cairo
mailing list