Re: [BUG] pdfcairo notransparent has transparency

Ethan A Merritt <[email protected]>
Newsgroups gmane.comp.graphics.gnuplot.devel
Organization University of Washington
Message-ID <4954273.tu4cgC8IXa@stonelion>
On Thursday, 20 August 2020 21:42:51 PDT Henri Menke wrote:
> 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.  

The "{no}transparent" option used by several gnuplot terminals
specifically refers to the plot background.  It does not, and was never
intended to, disable transparency in the plot proper.   The two things
are orthogonal.   Consider for example
 
    set term png notruecolor transparent 

This sets the background to be transparent but the plot contains no
alpha channel because it uses indexed color. 
Contrast this with

    set term png truecolor backgound "grey"

This sets the background to be opaque (=notransparent),
but the plot itself uses 24bit RGB color + alpha channel.

	Ethan



> 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.