[pstricks] fillstyle=transparent affecting entire page

Kjell Magne Fauske kjellmf at gmail.com
Mon Sep 24 08:56:49 CEST 2007


On 9/23/07, Tom Johnson <tjhnson at gmail.com> wrote:
> Hi,
>
> I am using fillstyle=transparent, and I am quite happy with the results.
>
> When viewing the resultant pdf via 'xpdf', everything looks fine---same with
> evince.  However, when viewed with acrobat, it seems to be affecting colors
> for the entire page, rather than on just the specified object.  Is this
> avoidable?
>
> This is troublesome when making presentations (beamer, prosper).  If I use
> the transparent fillstyle, the entire slide changes colors.
>
> Below is some sample code demonstrating the effect.  The green frame changes
> color even though its style is not set to be transparent.  Again, this
> effect is only noticeable in acrobat.
>
> ESP Ghostscript 8.15.4
> Adobe Reader 7.08 (linux)
>
> \documentclass{article}
> \usepackage{pstricks}
> \usepackage{pstricks-add}
> \begin{document}
> \begin{figure}[!ht]
> \psset{unit=2cm}
> \begin{pspicture}(0,0)(10,10)
> \psframe*[linecolor=green](0,0)(5,5)
> \psframe*[linecolor=red](3,3)(8,8)
> \end{pspicture}
> \end{figure}
> \newpage
> \begin{figure}[!ht]
> \psset{unit=2cm}
> \begin{pspicture}(0,0)(10,10)
> \psframe*[linecolor=green](0,0)(5,5)
> \psframe[linecolor=red,fillcolor=red,fillstyle=transparent,transpalpha=.8](3,3)(8,8)
> \end{pspicture}
> \end{figure}
> \end{document}
>
> Thanks!

This is probably due to a bug in how transparency is handled in
Acrobat. I have the same problem when using transparency with PGF and
TikZ. See for instance these threads for a
discussion about this.

http://groups.google.com/group/comp.text.tex/browse_frm/thread/2980e11f03753fcf/
http://sourceforge.net/forum/message.php?msg_id=4048333

Other PDF viewers also have problems, for instance GSView where
antialiasing does not work when transparency is used.

If you have a full version of Acrobat you can solve the problem by
flattening the document.

- Kjell Magne Fauske



More information about the PSTricks mailing list