Problème avec opacity

Bonjour,

Depuis quelques temps, je ne peux plus gérer la transparence de mes figures :
\documentclass{minimal}
\usepackage{pstricks-add}

\begin{document}

\begin{pspicture}(-5.5,-5.5)(5.5,5.5)%
\psframe[fillstyle=solid,fillcolor=orange,opacity=0.4](5,2)(6,5)
\psframe[fillstyle=solid,fillcolor=orange,opacity=0.8](4,2)(5,5)


\end{pspicture}

\end{document}

Ne génère pas d'erreur, mais les deux rectangles sont de la même couleur...
Avez-vous une idée d'où cela peut provenir ?

D'avance merci,
Vincent Maille

Réponses

  • Bonjour,

    Chez moi ça marche par latex > dvipdf, mais il faut passer l'option
    dvipdf -dALLOWPSTRANSPARENCY vincent.dvi
    

    /tmp >  dvipdf vincent.dvi
    
    %%%% WARNING: Transparency operations ignored - need to use -dALLOWPSTRANSPARENCY
    
    Error: /undefined in .setopacityalpha
    Operand stack:
       0.4
    Execution stack:
       %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1990   1   3   %oparray_pop   1989   1   3   %oparray_pop   1977   1   3   %oparray_pop   1833   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
    Dictionary stack:
       --dict:732/1123(ro)(G)--   --dict:0/20(G)--   --dict:196/200(L)--   --dict:174/300(L)--   --dict:38/200(L)--   --dict:133/200(L)--
    Current allocation mode is local
    GPL Ghostscript 9.54.0: Unrecoverable error, exit code 1
    /tmp >  dvipdf -dALLOWPSTRANSPARENCY vincent.dvi
       **** WARNING: .setopacityalpha is deprecated (as of 9.53.0) and will be removed in a future release
       **** See .setfillconstantalpha/.setalphaisshape for the improved solution
       **** WARNING: .setopacityalpha is deprecated (as of 9.53.0) and will be removed in a future release
       **** See .setfillconstantalpha/.setalphaisshape for the improved solution
    
  • Merci j'utilise latex, dvi2ps, ps2pdf

    Vincent
  • Je crains que le format PostScript ne supporte pas réellement la transparence partielle...
    Wikipédia en
    https://stackoverflow.com/a/29324411
    Quand ça semble fonctionner, c'est de la bidouille. Mieux vaut utiliser PDF à mon avis.
  • Bonsoir. J'ai fait ceci.
    Processus en cours : latex -src -interaction=nonstopmode "texstudio_MZipSN".tex
    Processus terminé normalement
    
    Processus en cours : latex -src -interaction=nonstopmode "texstudio_MZipSN".tex
    Processus terminé normalement
    
    Processus en cours : dvips -R0 "texstudio_MZipSN".dvi
    This is dvips(k) 2021.1 Copyright 2021 Radical Eye Software (www.radicaleye.com)
    ' TeX output 2021.05.31:2152' -> texstudio_MZipSN.ps
    </usr/local/texlive/2021/texmf-dist/dvips/base/tex.pro>
    </usr/local/texlive/2021/texmf-dist/dvips/pstricks/pstricks.pro>
    </usr/local/texlive/2021/texmf-dist/dvips/pstricks/pst-algparser.pro>
    </usr/local/texlive/2021/texmf-dist/dvips/pst-tools/pst-tools.pro>
    </usr/local/texlive/2021/texmf-dist/dvips/pstricks/pst-dots.pro> </usr/local/texlive/2021/texmf-dist/dvips/pst-node/pst-node.pro>
    </usr/local/texlive/2021/texmf-dist/dvips/pst-3d/pst-3d.pro> </usr/local/texlive/2021/texmf-dist/dvips/pst-math/pst-math.pro>
    </usr/local/texlive/2021/texmf-dist/dvips/pstricks-add/pstricks-add.pro> </usr/local/texlive/2021/texmf-dist/dvips/l3backend/l3backend-dvips.pro>
    </usr/local/texlive/2021/texmf-dist/dvips/base/special.pro> </usr/local/texlive/2021/texmf-dist/dvips/base/color.pro>.
    [1]
    Processus terminé normalement
    
    Processus en cours : ps2pdf -dALLOWPSTRANSPARENCY "texstudio_MZipSN".ps
    Processus terminé normalement
    
    Processus en cours : open "texstudio_MZipSN".pdf
    Processus terminé normalement
    
    L'ïambe est bien passée.
    Jean-éric.
Connectez-vous ou Inscrivez-vous pour répondre.