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

Home » Public Forums » archive » Re: PRINTER device changed in IDL 6
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: PRINTER device changed in IDL 6 [message #38297] Mon, 01 March 2004 12:04 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
R.G. Stockwell writes:

> Perhaps (or more likely certainly) I am missing the point, but why load colours inside the
> Printer device? I have always loaded the colors I want before I set the
> set_plot device (usually because I load my very pretty colors in my startup file, and I
> almost never change them). Simply reversing the order of the two calls (tvscl and set_plot)
> makes the error go away.

Well, 16.7 million colors to choose from, some of us are
just not happy with 256, no matter how pretty they are. :-)

No, I'm kidding. This comes up for me because I try
to write programs that are device independent. That is
to say, they work the same way (use the same colors, lay
out their graphics in the same place, align their fonts
in the same way, etc.) no matter what graphics output
device they happen to find themselves running on. In
practice I only care about these: X, WIN, Z, PS, PRINTER.
But even that is challenge enough to cause me to break
out in cold sweats in the middle of the night. (Throw in
MAC and I shake so much I pretty much can't even serve
in tennis.)

But the point is, I try to make these programs self-contained
and smart. In the business I'm in, I can't ever rely on the
environment being set up like mine (or even set up properly
according to my instructions, but that's for another day).
I *have* to load colors inside my programs if I expect them
to work properly. So, as you can see, it's a bit of a problem.

At the moment I am working around this problem by "protecting"
TVLCT commands like this:

IF !D.Name EQ 'PRINTER' THEN BEGIN
Set_Plot, 'Z', /Copy
TVLCT, theColor, theIndex
Set_Plot, 'PRINTER', /Copy
ENDIF ELSE TVLCT, theColor, theIndex

But that seems like a lot of fluff for a single TVLCT command!

Maybe I'll just follow the same path I used when I had to write
25 lines of code every time I wanted to use a TV command, and just
write my own color loading routine. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: amoeba/mpfit/etc with a quantized variable?
Next Topic: Statistic codes: Significance level

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

Current Time: Fri Oct 10 01:00:11 PDT 2025

Total time taken to generate the page: 0.55804 seconds