[cairo] PDF Backend for cairo

Kristian Høgsberg krh at bitplanet.net
Mon Nov 29 17:09:48 PST 2004


Carl Worth wrote:
...

>>Right now the PDF backends only render the trapezoids cairo passes it 
>>after tesselation.  PDF has the same curve_to and line_to operators as 
>>cairo has and could do stroking and filling if it was passed the 
>>highlevel path instead of the tesselation output.  I think this could be 
>>acheived by adding stroke_path() and fill_path() function pointers to 
>>the cairo_surface_backend_t struct, something along these lines:
> 
> I think this seems quite reasonable, and will likely help out with some
> of the file size issues as well as slow performance and seams we've seen
> in some PDF viewers already.
> 
> However, if we are going to rely on PDF tessellation, I want to make
> sure we understand it well enough to guarantee we get high-quality
> results.
> 
> For example, Keith and I played with PostScript a while back and without
> too much effort we came up with the attached test case that gives a
> "wrong" result on every implementation we had available at the time.
> 
> This is a hand-crafted PostScript file that is simply a single wide
> spline that turns very sharply, (an equivalent thinner spline is also
> drawn to make it more obvious what it happening).

I've attached the equivalent pdf version.  In acroread, the corner looks 
perfectly round, but gpdf renders it with artifacts similar to what you 
describe.  I couldn't get ggv to load it, so I suspect I got an offset 
wrong or something.  Anyway, I'll revisit this later, for now I'm still 
trying to get a feel for how the cairo features map to PDF.

cheers,
Kristian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: badspline.pdf
Type: application/pdf
Size: 613 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20041129/2c77cb0d/badspline.pdf


More information about the cairo mailing list