[cairo] RecordingSurface based patterns rasterized when painted to vector surface?

Chris Wilson chris at chris-wilson.co.uk
Thu May 10 05:30:50 PDT 2012

On Thu, 10 May 2012 14:12:25 +0200, Julian Viereck <julian.viereck at googlemail.com> wrote:
> I'm working on a new feature for Firefox. I've got a PDFSurface and create a similar surface. This gives me back a RecordingSurface. I perform some drawing operations agains the recording surface. Then, a pattern is created based on the recording surface (using |mPattern = cairo_pattern_create_for_surface(RecordingSurface)|) and the pattern is drawn to the PDFSurface (using |cairo_set_source(PDFSurfaceCairo, mPattern); cairo_paint_with_alpha(PDFSurfaceCairo, alpha);|) . The output of the recording surface appears to be rasterized in the final PDF. 
> Currently, I'm not 100% sure if this is the problem, but does Cairo rasterize a recording surface when used as pattern and this gets drawn to a PDFSurface?

Only if the recording surface contains an operation that cannot be
performed natively within the PDF, or if the extend mode of the pattern
is not supported by PDF (e.g. EXTEND_PAD).

Chris Wilson, Intel Open Source Technology Centre

More information about the cairo mailing list