[cairo] default rendering engine

Carl Worth cworth at east.isi.edu
Tue May 4 02:01:38 PDT 2004


On Mon, 3 May 2004 18:59:15 +0200, "Maarten Breddels" wrote:
> > -----Original Message-----
> > From: cairo-bounces at cairographics.org 
> > [mailto:cairo-bounces at cairographics.org] On Behalf Of Jon Smirl
> > Sent: maandag 3 mei 2004 18:21
> >
> > Shouldn't there be some way to write a program that lets the Cairo
> > implementation select the back end for the app? The idea being to
> > keep knowledge of xlib and gl out of a pure Cairo app.

This is an interesting idea, but a "pure cairo" application wouldn't be
very interesting since there wouldn't be any way to accept user input
through the window system. But when people develop toolkits on top of
cairo, then it's easier to abstract away the details of the cairo
backend if necessary.

> Or even a 
> 	cairo_default_surface_create(char* name, int width, int height);
> 
> This way the demo's don't have to be written for png or X backends. It
> might even be nice to let the default surfaces depend on a environmental
> variable. 

This is still quite desirable.

I've been hoping to work on something similar within the cairo-demo
source code for some time. I'd like to get to the point where writing a
new demo means simply creating a new function:

	void draw (cairo_t *cr) { ... }

And the program provides support for drawing through all available
backends.

Let's start by doing this kind of thing inside the demo applications,
then we can decide if it makes sense to push anything down into the
library.

-Carl




More information about the cairo mailing list