[Cairo] Preliminary PostScript output support in cairo-0.1.11

Bill Spitzak spitzak at d2.com
Wed Nov 5 10:16:06 PST 2003


On Wednesday 05 November 2003 02:17 am, Thorsten Behrens wrote:

> 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.

That will just move the discontinuity further away. Imagine if they print a 
transparent rectangle over a portion of the text. If the "entities" are 
characters then you will see a discontinuity between adjacent letters between 
the last outside one and the first one that intersects the rectangle. If 
instead the entities are lines or paragraphs or calls to the print-string 
routine, the discontinuity will be further away and perhaps unusually shaped. 
I would think that the best place to put the discontinuity is where there 
already is one, at the edge of the transparent overlay.

Then again it sounds like you have worked on this, while I have not, so if 
you can explain why your solution is better I would like to know.

> 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
> asynchronously).

I thought of that but there seems to be a problem that Cairo is not totally 
asynchronous and thus everything would have to be interpreted twice. Also the 
difficulty of removing partially-hidden graphics (though your solution would 
eliminate that). Also if all output was produced the resulting ps file could 
be edited to reproduce the original cairo output if special comments were 
inserted before the images indicating the graphics that *should* be drawn at 
that point. Even without such comments it would be possible to post-process 
the ps to remove unwanted bitmaps and produce a clean simulation of most of 
the printing.

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




More information about the cairo mailing list