[cairo] Bug: SurfacePattern is rasterized when using EXTEND_REPEAT on PDF.
simon.sapin at kozea.fr
Wed Jan 11 10:34:46 PST 2012
I have a bug in WeasyPrint (converts web documents to PDF): repeated SVG
backgrounds are rasterized. (They appear as pixels instead of vectors.)
The source of the bug is in cairo or Pycairo. When a vector-type surface
(PDFSurface or SVGSurface) is used as a source through a SurfacePattern
and that pattern has EXTEND_REPEAT, the pattern is rasterized.
Attached is a test case that uses Pycairo to create an 'output.pdf' file
in the current directory. When zoomed in a PDF viewer, the line on the
left (not repeated) is in nice crips vectors, while the one on the right
(with EXTEND_REPEAT) is in blurry pixels.
I had a quick look I’m not very familiar with cairo’s code base. In
which file is EXTEND_REPEAT implemented? Would this be hard to solve?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 462 bytes
Desc: not available
More information about the cairo