PDF export issue with blend mode & opacity != 1
Summary:
Exported PDF has wrong colours where a semi-transparent object with non-trivial blend mode (e.g. multiply) covers another object.
Steps to reproduce:
- open Inkscape
- open attached blend-mode-minimal-example.svg
- export the file as PDF
- compare visually PDF & SVG
The example file was created as follows:
- draw a red rectangle
- draw a white & black rectangles next to each other, partially covering the red one
- set white & black rectangles fill to opacity: 50% and blend-mode: multiply
Note no issues occur with just blend mode (& opacity: 100%) or just opacity 50% and normal blend mode.
What happened?
PDF & SVG files look differently - the areas where black & white rectangles cover the red one have wrong colours. In particular, when using blend-mode: multiply, the white one should have no effect on the underlying object (this is what happens in SVG), but it has (in PDF).
The attached PNG file is a screenshot showing differences between the SVG in inkscape & PDF in google-chrome.
What should have happened?
PDF & SVG files should look the same.
Sample attachments:
blend-mode-minimal-example.pdf
Version info
Inkscape 1.2.2 (1:1.2.2+202212051552+b0a8486541)
GLib version: 2.72.4
GTK version: 3.24.33
glibmm version: 2.66.2
gtkmm version: 3.24.5
libxml2 version: 2.9.13
libxslt version: 1.1.34
Cairo version: 1.16.0
Pango version: 1.50.6
HarfBuzz version: 2.7.4
OS version: Ubuntu 22.04.2 LTS