[pstricks] Real transparency hack

Jan Steffan me at jansteffan.de
Tue Jul 12 22:01:21 CEST 2005


On Tuesday 12 July 2005 21:20, Herbert Voss wrote:
> > I hacked together a proof of concept based on pstricks that defines a new
> > fillstyle "transp" as this was the easiest the solution I could quickly
> > find. A real solution should provide transparency independently of
> > filling.
> >
> > I probably also did not consider all sideeffects and problems this hack
> > may cause and I surely didn't fully comprehend the PDF transparency mode,
> > which is quite complicated.
>
> looks good, I'll put this stuff into pstricks-add

stop! Not so fast :) 

First of all: this seems to work with really new versions of ghostscript only.
For me it worked with GPL Ghostscript 8.01 and AFPL Ghostscript 8.50, but
it produced blank output with ESP Ghostscript 7.07 (which might have been
compiled without the transparency option).

Also if a Postscript file produced in this way is run through the pdfwriter of
ghostscript without setting the version to 1.4 (e.g. by calling ps2pdf) it 
produces a rangecheck error (in compliance with the documentation).
I think the transparency statement should be wrapped somehow, so this doesn't
happen. However, I don't know how to do this in Postscript.

Most of all I think the transparency option should be more generic, so it can 
be applied to strokes and other fillstyles, too. To me it seems that in order 
to do so, \pst at object would have to be changed which probably can't be done
within an additional style file. 
Maybe the pstricks experts here know some other hook where this could be 
integrated. 

Finally as I said, I read enough about postscript and pstricks to get the
little example working. I don't know for instance the difference between 
shapealpha and opacityalpha---both seem to work.

So I think before this can find it's way into some package, the whole thing
needs a lot more research, thinking and most of all testing! 

 Jan

-- 
 gpg --keyserver subkeys.pgp.net --recv-keys DE34EFA1




More information about the PSTricks mailing list