[BUG] pdfcairo notransparent has transparency

Henri Menke <[email protected]>
Newsgroups gmane.comp.graphics.gnuplot.devel
Message-ID <20200821044251.ayprtt2gsnlbtzlc@vento15post8>
Dear all,

With regards to my recent patch to optionally disable transparency on
cairolatex, I stumbled upon the fact that the PDF output of the cairo
terminal does not properly respect the notransparent option.  Consider
the following minimal example:

    set terminal pdfcairo notransparent
    set output "test.pdf"
    plot sin(x)

When running this, the page is still encapsulated in a transparency
group.  This breaks PDF/A compatibility.

    $ gnuplot test.gnuplot
    $ grep -aC6 'Transparency' test.pdf
    << /Type /Page % 1
       /Parent 1 0 R
       /MediaBox [ 0 0 360 216 ]
       /Contents 4 0 R
       /Group <<
          /Type /Group
          /S /Transparency
          /I true
          /CS /DeviceRGB
       >>
       /Resources 3 0 R
    >>
    endobj

I'm not entire sure and I haven't tested this yet, but the cairo
terminal uses the gp_cairo_set_color function from
src/wxterminal/gp_cairo.c which in turn calls cairo_set_source_rgba.
This explicit call for transparency might be the cause for cairo
inserting a transparency group, even if all alpha values are zero or
one.

Cheers, Henri


_______________________________________________
gnuplot-beta mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.