[cairo] Cairo - PDF backend
Miklós Erdélyi
erdelyim at gmail.com
Sat Jun 24 08:29:12 PDT 2006
Hi,
By the excuse of Google's SoC I started doing Inkscape's PDF export with Cairo.
The Cairo library is really fun to use, so the simple things like
filling with solid color, setting stroking style has been implemented
quickly.
Now I'm struck with drawing linear/radial gradients, because they just
don't work (now I know that they've been disabled on purpose). The
first problem was that because _pattern_supported said
gradient patterns aren't supported, the output was always an image
fallback. So I re-enabled native gradients which resulted in no
visible output. The interpolation functions and other stuff are well
exported but the painting/filling itself doesn't produce any visible
output (I'm testing with a simple linear gradient from cairo-snippets'
gradient.cairo).
I tried changing to shading dictionaries but still there's no output,
I will have to carefully check out the specification what's wrong
there. I'm creating a clipping path first (W* n), then emitting the
shading operator (/Sh%d sh) in surface_paint. It would work if these
were after each other in a stream, but because the PDF backend puts
these into different resources I might be missing something (like the
clipping path gets reset?).
Please help me with some ideas regarding the cause of this problem.
Thank you.
Best regards,
Miklós Erdélyi
More information about the cairo
mailing list