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
This commit is contained in:
Adrian Johnson 2021-10-03 14:39:22 +10:30
parent d87fe096b9
commit 58aadd1481

View file

@ -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;