|
Re: call to X device opens window [message #50972 is a reply to message #50742] |
Wed, 25 October 2006 17:23  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Bringfried Stecklum writes:
> Just a quick question related to the X device. I am just wondering why
> device,set_font='AnyFontYouLike' opens a window if none are open while,
> e.g. device,deco=0 does not do it?
Of course, you don't have to see this window
open on your display, I don't think. I think
a pixmap window works just as well.
thisWindow = !D.Window
Window, /Free, /pixmap, XSize=10, YSize=10
Device, Set_Font='AnyFont'
WDelete, !D.Window
IF thisWindow GE 0 THEN WSet, thisWindow
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: call to X device opens window [message #50973 is a reply to message #50742] |
Wed, 25 October 2006 17:20  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Sven Geier writes:
> This guess is informed more by my knowledge of X than IDL, though, so
> there's no guarantees...
I think that about nails it.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: call to X device opens window [message #50975 is a reply to message #50742] |
Wed, 25 October 2006 17:02  |
Sven Geier
Messages: 17 Registered: July 2002
|
Junior Member |
|
|
Bringfried Stecklum wrote:
> Just a quick question related to the X device. I am just wondering why
> device,set_font='AnyFontYouLike' opens a window if none are open while,
> e.g. device,deco=0 does not do it?
>
1) The correct answer: Who knows why something in IDL works the way it
works...
2) The "best guess": device,/deco doesn't really do anything to the device -
it merely tells IDL how to treat that device (i.e. how to handle color). It
can be executed whether the device actually exists or not, as long as
you're not actually plotting anything. While set_font needs to make sure
whatever font you selected actually exists which means it needs to actually
talk to the X-server (of Xfs, really, I suppose): Because the X-server
could have different fonts available for different screens (different
resolutions etc) there needs to be an actual drawable with an
actually-existing resolution, color-depth etc before you can talk
about "fonts".
This guess is informed more by my knowledge of X than IDL, though, so
there's no guarantees...
-S
--
http://www.sgeier.net
My real email address does not contain any "Z"s.
|
|
|