comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » How to create a transparent shadow on the PostScript device?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to create a transparent shadow on the PostScript device? [message #67710 is a reply to message #67575] Tue, 11 August 2009 04:44 Go to previous messageGo to previous message
duxiyu@gmail.com is currently offline  duxiyu@gmail.com
Messages: 88
Registered: March 2007
Member
I am sorry that I still do not know how to do that.
Could you give me an example?
The example in your website is as follow, and I just want to get the
same figure in PS device.


PRO Transparent_Polygon

WINDOWSIZE=400

; Create some data.
signal = LoadData(1) - 15
time = Findgen(N_Elements(signal)) * 6.0 / N_Elements(signal)

; Create some windows.
Window, Title='Data Window', XSIZE=WINDOWSIZE, YSIZE=WINDOWSIZE, $
/FREE, XPOS=0, YPOS=0
dataWin = !D.Window
Window, Title='Polygon Window', XSIZE=WINDOWSIZE, YSIZE=WINDOWSIZE,
$
/FREE, XPOS=WINDOWSIZE+10, YPOS=0
polyWin = !D.Window

; Draw plot in data window.
WSet, dataWin
Plot, time, signal, BACKGROUND=FSC_Color('ivory'), $
COLOR=FSC_Color('navy'), $
/NODATA, XTitle='Time', YTitle='Signal Strength'
OPLOT, time, signal, THICK=2, COLOR=FSC_Color('cornflower blue')
OPLOT, time, signal, PSYM=2, COLOR=FSC_Color('olive')

; Take a snapshot.
background = TVREAD(TRUE=3)

; Copy data window and draw a polygon in the polygon window.
WSet, polyWin
DEVICE, COPY=[0, 0, WINDOWSIZE, WINDOWSIZE, 0, 0, dataWin]
POLYFILL, [ 0, 6, 6, 0, 0], $
[-5, -5, 5, 5, -5], /DATA, $
COLOR=FSC_COLOR('deep pink')

; Take a snapshot of this window, then delete it.
foreground = TVREAD(TRUE=3)

; Use a 25% transparent alpha.
alpha = 0.25
Window, Title='Transparent Polygon Window', XSIZE=WINDOWSIZE,
YSIZE=WINDOWSIZE, $
XPOS=2*WINDOWSIZE+20, YPOS=0, /FREE
TV, (foreground * alpha) + (1 - alpha) * background, TRUE=3

END


On Aug 10, 4:45 pm, Craig Markwardt <craig.markwa...@gmail.com> wrote:
> On Aug 10, 8:28 am, "dux...@gmail.com" <dux...@gmail.com> wrote:
>
>> Hi, all.
>
>> There is a method to create a transparent polygen in David's website.http://www.dfanning.com/code_tips/transpoly.html
>
>> But it seems that it does not work on the PS device.
>> Is there anyone who can give me a simple example of creating a
>> transparent shadow on the PS device?
>
> David's technique requires that your program can interact with the
> output device, which does not happen for postscript output.
>
> Postscript does not have specific transparency options.  You would
> basically need to render your full scene on the screen, or in a Z
> buffer, and then print the resulting pixmap.
>
> Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to create a evf?
Next Topic: values changed after using print

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 09:50:54 PDT 2025

Total time taken to generate the page: 0.79953 seconds