[Cairo] Preliminary PostScript output support in cairo-0.1.11

Thorsten Behrens thorsten.behrens at sun.com
Wed Nov 5 02:17:36 PST 2003

Yesterday, Gustavo 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 is nice, as long as the intersected drawings are simple and uniform
on all PostScript devices. But especially for text, I doubt that the
result will be satisfactory (I'm talking about a glyph partly covered by a
transparent object here). OOo had tons of trouble with that, and we
reverted to treat the transitive closure of all intersecting bound rects
as a bitmap, iff at least one of the included objects is transparent. This
ensures that no discontinuities are visible within single entities, and
that objects unaffected by transparency are output as true PostScript.

And yes, to achieve that, we have to record a metafile (which has the
additional advantage that it's comparatively fast (compared to preparing
huge bitmaps), and the actual PostScript output can be done

Just my 2 cents,



"Historically speaking, the presence of wheels in Unix has never precluded
their reinvention." [Larry Wall]

More information about the cairo mailing list