Commit c2f91435 authored by Oliver Sander's avatar Oliver Sander

[cairo] Use stroke opacity when clipping to a stroke path

Fixes: poppler/poppler#178
parent 7c890b37
......@@ -33,6 +33,7 @@
// Copyright (C) 2018, 2020 Adam Reichold <>
// Copyright (C) 2019 Marek Kasik <>
// Copyright (C) 2020 Michal <>
// Copyright (C) 2020 Oliver Sander <>
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -585,11 +586,17 @@ void CairoOutputDev::updateFillColorStop(GfxState *state, double offset) {
// If stroke pattern is set then the current fill is clipped
// to a stroke path. In that case, the stroke opacity has to be used
// rather than the fill opacity.
// See
auto opacity = (state->getStrokePattern()) ? state->getStrokeOpacity() : state->getFillOpacity();
cairo_pattern_add_color_stop_rgba(fill_pattern, offset,
LOG(printf ("fill color stop: %f (%d, %d, %d)\n",
offset, fill_color.r, fill_color.g, fill_color.b));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment