[pstricks] Opacity problems with pst-solides3d, pstricks, and distiller

halbard7 at aol.com halbard7 at aol.com
Sun Aug 3 23:51:05 CEST 2008


Hello pstricksters,

I'm trying to get transparency to work in a pdf document. Here is the code:

? \documentclass{article}
? \usepackage[distiller]{pstricks}
? \usepackage{pst-solides3d}

? \begin{document}

? \begin{pspicture}(5,5)
?? \psset{fillstyle=solid}
?? \psframe[fillcolor=red](0,1)(3,4)
?? \psframe[fillcolor=blue,opacity=0.3](2,2)(5,5)
?? \psframe[fillcolor=green,opacity=0.3](1,0)(4,3)
?? \pscircle[fillcolor=cyan,opacity=0.5](1.5,3.5){1.25}
? \end{pspicture}

? \psset{unit=0.5}
? \begin{pspicture}(-8,-8)(8,8)
?? \psSolid[object=cube,
??? fillcolor=cyan,
??? affinagecoeff=.5,
??? affinagerm,
??? fcolor=.7 setfillopacity Yellow,
??? hollow,
??? affinage=all,]

? \end{pspicture}

Using ps2pdf I get transparency in the cube but not the other part. Using distiller I get transparency in the other part, but not the cube. This I can understand, because if the distiller option is used then setopacityalpha, inter alia, is redefined to do nothing by pstricks.pro under distiller. However, if I put the kludge

??? /.setopacityalpha { [ exch /ca exch dup /CA exch /SetTransparency pdfmark } bind def

in a particular place in pst-solides3d.tex (at the end of \pst_at_def{optionssolides} to be exact) then I get transparency in both parts! This shows it must be possible to have transparency working for both packages under distiller. However, in the absence of more extensive testing this workaround does not strike me as robust.

Incidentally, without the distiller option there is no transparency in either part, as expected (ps2pdf is unaffected.)

To make pst-solides3d compatible with distiller is the problem. Any thoughts?

Gerry Coombes

________________________________________________________________________
AOL Email goes Mobile! You can now read your AOL Emails whilst on the move. Sign up for a free AOL Email account with unlimited storage today.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20080803/17a79a93/attachment.html 


More information about the PSTricks mailing list