[Cairo] Preliminary PostScript output support in cairo-0.1.11

Bill Spitzak spitzak at d2.com
Tue Nov 4 12:38:35 PST 2003


On Tuesday 04 November 2003 07:54 am, Gustavo J. A. M. Carneiro wrote:

>     I once generated a PS file with gnomeprint containing a a background
> (grid lines), a translucent rectangle rectangle, and on top of the
> translucent rectangle some opaque lines and text.  The great thing about
> the generated postscript is that it created, in the area of the
> translucent rectangle, an image that renders only the translucent
> rectangle and the grid lines behind.  The text+lines on top of the
> rectangle, however, are drawn normally as vectorial postscript
> operators.  See here for an example of this (increase the zoom of
> ghostview to 10x to notice the pixelization in the area of the plot
> legend):
> 	http://yang.inescn.pt/~gjc/output.ps.bz2

This does look like a solution. What it appears to do is maintain an image, 
but all drawing that can be done also generates postscript. When it 
recognizes a drawing it cannot do in Postscript, it sets the clip to the 
boundary of the shape and draws the bounding box from the image. Note that 
the Postscript to draw the part obscured by the image will still be put into 
the output stream, this is probably not really that bad.

A switch to cairo_ps_surface_create that indicates that no image should be 
generated would be useful. In this case any commands that cannot turn into 
PostScript are ignored.

-- 
                   ,~,~,~,~ ~ ~ ~ ~
     /\_       _|_========___         Bill Spitzak
 ~~~/\/\\~~~~~~\____________/~~~~~~~~ spitzak at d2.com




More information about the cairo mailing list