[Cairo] Preliminary PostScript output support in cairo-0.1.11

Gustavo J. A. M. Carneiro gjc at inescporto.pt
Tue Nov 4 05:42:52 PST 2003


A Ter, 2003-11-04 às 03:42, Carl Worth escreveu:
> I've just committed some proof-of-concept code for PostScript output
> from cairo-0.1.11. (Have I mentioned yet that I have started posting
> versioned tar files to http://cairographics.org/snapshots/ ? I guess I
> have now.)
> 
> The essential new API functions are:
> 
> 	void
> 	cairo_set_target_ps (cairo_t    *cr,
> 	                     FILE       *file,
> 	                     double     width_inches,
> 	                     double     height_inches,
> 	                     double     x_pixels_per_inch,
> 	                     double     y_pixels_per_inch);
> 
> 	void
> 	cairo_show_page (cairo_t *cr);
> 
> There's a very simple demonstration program in cairo-demo/PS/basket.c
> that demonstrates how easy it is to get matching PNG and PostScript
> output. The PostScript output has multiple pages suitable for low-tech
> flipbook animation. (Yes, this is proof that I shouldn't be writing
> applications --- somebody, please put me out of the demo writing
> business by writing better demos).
> 
> There are a few things to note about the current implementation (which
> could definitely be improved on):
> 
> 1) The output should have high-fidelity. Cairo doesn't depend on the
>    PostScript interpreter to do anymore than display an image, and
>    actually does all of its own drawing. This means that things like
>    translucency still work even though PostScript doesn't support that
>    directly.

  Please tell me this is just experimental code!  Sending images to the
printer is _not_ at all what I had in mind as postscript backend. 8-|

  Regards.

-- 
Gustavo João Alves Marques Carneiro
<gjc at inescporto.pt> <gustavo at users.sourceforge.net>






More information about the cairo mailing list