From a402bdbd32d3ffe4b564318e6dd83831328257b1 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Mon, 31 Aug 2009 22:15:57 +0930 Subject: [PATCH] PDF: Flush operators before writing to the PDF stream --- src/cairo-pdf-surface.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 577d7e5da..2b8dceba6 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -3295,6 +3295,10 @@ _cairo_pdf_surface_paint_surface_pattern (cairo_pdf_surface_t *surface, if (! _cairo_surface_is_meta (source->surface)) cairo_matrix_scale (&pdf_p2d, width, height); + status = _cairo_pdf_operators_flush (&surface->pdf_operators); + if (unlikely (status)) + return status; + if (! _cairo_matrix_is_identity (&pdf_p2d)) { _cairo_output_stream_printf (surface->output, "%f %f %f %f %f %f cm\n",