[cairo] Meta surface proposal

Owen Taylor otaylor at redhat.com
Sun Feb 6 17:36:10 PST 2005


On Sun, 2005-02-06 at 16:41 -0800, Keith Packard wrote:
> Around 17 o'clock on Feb 6, Owen Taylor wrote:
> 
> > Why we conceivably want to drag the PDF rendering model into the
> > equation for rendering to a printer on Windows? That sounds like an
> > incredible headache for no gain compared to sticking with something
> > simpler.
> 
> The question isn't whether we use the "PDF rendering model" here, it's
> whether the PDF generated by cairo holds an accurate and concise
> representation of the rendering operations performed on the surface -- we
> need only understand a tiny fraction of PDF, and only that which cairo
> itself generates.
> 
> I think it's worth a tiny amount of exploration here to see how feasible 
> this is; with luck, we'll need only produce a cairo-PDF to printer GDI 
> conversion function and have complete vector output for GDI devices 
> wherever possible.
> 
> With your wrapper routines, we could bail on PDF, if necessary, and create a 
> custom meta file format in the future

OK, let's forget the rendering model, and just mention that we are
introducing here:
 
 - Generation and parsing of a complicated binary format
 - Conversion of trapezoid lists into paths and back
 - Serialization of images
 - Embedding of fonts, including bitmap fonts

To me it's a horrifyingly complex prospect for something that really
should be essentially pretty simple. There are 4, count them, 4,
functions in the surface vtable for drawing currently.

Can you create test cases where the in-memory buffer for rendering a 
single page becomes huge? Yes, you could. But in those cases I'd argue
that the final produced output file will also be huge. And if someone
is going to generate a 1gig single page postscript output file, I don't
feel bad about requiring them to buy some more memory.

Plus, it's very much unclear to me how you'd do the image-vs-vector 
separation without having the entire page parsed in memory at once
anyways.

Regards,
						Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050206/d3086747/attachment.pgp


More information about the cairo mailing list