From 58aadd1481421d3c3e3189b4de0f640404ecaaab Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 3 Oct 2021 14:39:22 +1030 Subject: [PATCH] pdf: reset current operator when resetting clip PDF output uses q/Q operators to reset the clip path. This also resets the PDF graphics state including the current blend mode. When resetting the clip path, reset the current blend mode tracked by the PDF surface so that if a non-default blend mode is required, the surface will emit the correct blend mode. Fixes #514 --- src/cairo-pdf-surface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 07fe5dffc..e51c36156 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -417,6 +417,7 @@ _cairo_pdf_surface_clipper_intersect_clip_path (cairo_surface_clipper_t *clipper _cairo_output_stream_printf (surface->output, "Q q\n"); surface->current_pattern_is_solid_color = FALSE; + surface->current_operator = CAIRO_OPERATOR_OVER; _cairo_pdf_operators_reset (&surface->pdf_operators); return CAIRO_STATUS_SUCCESS;