[cairo] support for external surface backends

Sebastian Reichel sre at ring0.de
Mon Jul 8 15:57:58 PDT 2013


We have a Chinese lasercutter at our hackspace, which uses some
obscure proprietary format. We are currently reverse engineering
the protocol and have written a simple tool, which translates the
format into svg using cairo. So far so easy :)

But we also want to support translating the other way around. For
this we thought about hooking into cairo as surface backend like

cairo_surface_t *surface;
cairo_t *cr;

surface = laser_cutter_surface_not_part_of_cairo(some, params);
cr = cairo_create(surface);


The backend does not really fit into a default cairo installation
and IMHO it does not fit into the cairo repository at all. Thus
we would like to put it into an additional library, which implements
the surface interface.

The problem is, that the cairo API does not allow external surface
backends if I'm not mistaken. I mainly see two reasons for this:

1. cairo_surface_type_t is a compile-time-generated enum in cairo's
2. cairo_surface_t and cairo_backend_t are not exposed in the
   public API

Are there any plans to make these kind of setups possible with

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130709/d2e5da09/attachment.pgp>

More information about the cairo mailing list