Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Translucency??

0 views
Skip to first unread message

Ancient_Hacker

unread,
May 10, 2007, 11:30:49 AM5/10/07
to
Hi, I'd like to be able to draw with translucency using PostScript.

I've tried one bit of code I found on the net but it doesnt do
transparency (with ghostscript):

gsave
100 100 translate % set position on page
0.4 0.7 1 setrgbcolor % draw a pastel blue box
40 40 60 60 rectfill
0.3 .setopacityalpha
0.4 .setshapealpha
1 0.5 0 setrgbcolor % draw transparent orange
20 20 60 60 rectfill
grestore
showpage

Mark T.B. Carroll

unread,
May 10, 2007, 12:09:35 PM5/10/07
to
Ancient_Hacker <gr...@comcast.net> writes:

> Hi, I'd like to be able to draw with translucency using PostScript.
>
> I've tried one bit of code I found on the net but it doesnt do
> transparency (with ghostscript):

(snip)

I'm afraid that PostScript fundamentally just doesn't do transparency,
although PDF does.

-- Mark

Ancient_Hacker

unread,
May 10, 2007, 1:31:34 PM5/10/07
to
On May 10, 11:09 am, Mark.Carr...@Aetion.com (Mark T.B. Carroll)
wrote:

I think it's more complicated than that.

It goes something like this:

Adobe added some transparency widgets to PDF 1.4, but not to
PostScript per se. Which is ridiculous.

Ghostscript added a different set of transparency commands.
And those might not be turned on in the distributed Windows binary.

Pretty lousy situation if you ask me.

Mark T.B. Carroll

unread,
May 10, 2007, 1:46:26 PM5/10/07
to
Ancient_Hacker <gr...@comcast.net> writes:
(snip)

> Adobe added some transparency widgets to PDF 1.4, but not to
> PostScript per se. Which is ridiculous.
>
> Ghostscript added a different set of transparency commands.
> And those might not be turned on in the distributed Windows binary.
>
> Pretty lousy situation if you ask me.

If you're willing to use non-standard extensions, e.g., those in
Ghostscript, what if you use Ghostscript's pdfwrite device, and then use
a PDF -> PS utility? It might be better than nothing, depending on your
need.

-- Mark

0 new messages