[cairo] default rendering engine

Maarten Breddels dmon at xs4all.nl
Mon May 3 09:59:15 PDT 2004


> -----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
> To: cairo
> Subject: [cairo] default rendering engine
> 
> 
> Doesn't Cairo need a set of APIs for the concept of the 
> default rendering and
> print engines? Right now the app selects the back end when it 
> creates the Cairo
> surface. 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.
> 
> =====
> Jon Smirl
> jonsmirl at yahoo.com
> 

Yes, I thought about that too, it might be nice to get a (non-serious)
	cairo_screen_surface_create(char* title, int width, int height);
And maybe a 
	cairo_hardcopy_surface_create(char* filename, int width, int
height);

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. 
So,
	$ env CAIRO_SURFACE=png ./demo/hoeba/blaat
Will render the output to png. 
And
	$ env CAIRO_SURFACE=glitz ./demo/hoeba/blaat
Using the glitz backend.
This way you can easily create hardcopies of the demo's or you own cairo
program. And test all the backends easily. And using cairo for the first
time, you won't have to worry about the details of creating a platform
specific surface.

-Maarten Breddels





More information about the cairo mailing list