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

Home » Public Forums » archive » Re: PS device
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: PS device [message #13319] Fri, 30 October 1998 00:00
Richard G. French is currently offline  Richard G. French
Messages: 65
Registered: June 1997
Member
Harald Frey wrote:
>
> Which system variable (if it exists) contains the information, if the
> current postscript device is set to portrait/landscape and
> encapsulated/non-encapsulated? I can see this informastion on the screen
> with the help,/device command, but how do I get this information into a
> variable or flag?
>
> Harald Frey
> hfrey@ssl.berkeley.edu

I thought it might have been encoded in the !D.FLAGS variable, but
this does not change, even when I change the value of /ENCAP
and /PORTRAIT. I have wanted to get my hands on this information
as well. If it can't be done, we can add it to the wish list
for next release!
Dick French
Re: PS device [message #13320 is a reply to message #13319] Fri, 30 October 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Harald Frey (hfrey@ssl.berkeley.edu) writes:

> Which system variable (if it exists) contains the information, if the
> current postscript device is set to portrait/landscape and
> encapsulated/non-encapsulated? I can see this informastion on the screen
> with the help,/device command, but how do I get this information into a
> variable or flag?

Well, no system variable is going to help you here.
You can, of course, always get the output of the HELP
command into a variable using the OUTPUT keyword. In
this case the information you want is on the fourth
line of the output:

IDL> Set_Plot, 'PS'
IDL> Help, /Device, Output=thisOutput
IDL> Print, thisOutput[3]
Mode: Portrait, Non-Encapsulated, EPSI Preview Disabled, Color Disabled

Now, you *could* look for the string "Portrait" in this
string and--failing to find it--conclude that you were in
landscape mode. Or, you could look for the string
"Non-Encapsulated" and failing to find it know you were
in Encapsulated mode. But RSI would not recommend this
course of action, since they reserve the right to change
the output of the HELP command at any time.

So what I do is use the PS_FORM program that you can
download from my web page. If it is used as below, you
can always know exactly how the PostScript device is
configured:

configuration = PS_FORM(/Initialize)
new_config = PS_FORM(Cancel=canceled, Defaults=configuration)
IF NOT canceled THEN BEGIN
configuration = new_config
thisDevice = !D.Name
Set_Plot, "PS"
Device, _Extra=configuration
... your graphic commands here ...
Device, /Close
Set_Plot, thisDevice
ENDIF

Cheers,

David

----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/

Note: A copy of this article was e-mailed to the original poster.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: sec_to_dt has gone missing!
Next Topic: PS device

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

Current Time: Wed Oct 08 17:38:36 PDT 2025

Total time taken to generate the page: 0.00616 seconds