Re: Some 2.6 thinking



Around 22 o'clock on Apr 13, Ross McFarland wrote:

> limitations of PostScript? PostScript is a programming language, there's
> basically nothing it can't do.

And cairo generates legal postscript, it's just not taking advantage of 
the high-level PostScript drawing commands.  People want to use those so 
that the resulting code is resolution independent as well as 
relatively compact.

The problem with postscript is that the abstract rendering surface is 
opaque to the language, you can't see the pixels that get layed down, so 
you can't do any arithmetic on them which isn't explicitly supported in 
by the available graphics operations.

Given the primitive nature of those graphics operations, you're left with 
no choice but to give up on them for anything they don't support (like 
image compositing or convolution).  

You could replace them with a postscript-based rendering engine that "drew"
pixels in a giant postscript array and then converted that to the target
rendering surface for printing.  However, that's an insane amount of work, 
and the resulting PostScript program would be both large and really slow; 
you'd be replacing hand-coded MMX assembly for image compositing with 
interpreted PostScript code.

The compromise is to do rendering which PostScript's operators can't 
manage within the application and ship the affected areas as arrays of 
pixels.  Areas which can be completely rendered with PostScript get drawn 
that way.  For document generation, this works pretty well with the text 
sent as PostScript and the figures (generally )sent as images.

The kludge is to just do all rendering in the application and ship the 
whole page as a giant array of pixels.  That's what cairo does right now, 
mostly because the improvement above is only an optimization, which means 
it's below finishing up the cairo API (including the extensions needed to 
support printing at all).

If anyone has the time and energy to start poking at the cairo postscript
backend to find some simple common cases which could be rendered directly,
that would be great.  Alternatively, if anyone wanted to start work on a
PDF 1.4 backend, that would be even better as cairo is designed to be fully
supported by PDF 1.4's rendering mode.

-keith


Attachment: pgpVrDdSuXAr8.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]