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

Home » Public Forums » archive » Re: A whine about default device settings
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: A whine about default device settings [message #58630] Mon, 11 February 2008 08:59 Go to next message
Bob[3] is currently offline  Bob[3]
Messages: 60
Registered: December 2006
Member
On Feb 9, 4:42 pm, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
> The new 24-bit Z-buffer device is nice for generating graphics on a
> device without a display, as is common with servers, for example.  It is
> easier to configure and use than Xvfb, for example.
>
> Unfortunately, some of the default device settings are different between
> the Z-buffer device and the X-Windows device.  (I haven't checked the
> WIN device because I don't have a Windows machine).
>
> IDL> window, xsize=1024, ysize=768
> IDL> help, !d, /str
> ** Structure !DEVICE, 17 tags, length=84, data length=84:
>    NAME            STRING    'X'
>    X_CH_SIZE       LONG                 6
>    Y_CH_SIZE       LONG                10
> IDL> set_plot, 'z'
> IDL> device, set_resolution = [1024, 768], set_pixel_depth = 24
> IDL> help, !d, /str
> ** Structure !DEVICE, 17 tags, length=84, data length=84:
>    NAME            STRING    'Z'
>    X_CH_SIZE       LONG                 8
>    Y_CH_SIZE       LONG                12
>

Win (note: v6.4) values:

IDL> window, xsize=1024, ysize=768
IDL> help, !d, /str
** Structure !DEVICE, 17 tags, length=84, data length=84:
NAME STRING 'WIN'
X_CH_SIZE LONG 7
Y_CH_SIZE LONG 10
X_PX_CM FLOAT 32.0000
Y_PX_CM FLOAT 32.0000


Fun-wow! :D
Re: A whine about default device settings [message #58636 is a reply to message #58630] Mon, 11 February 2008 05:51 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"Kenneth P. Bowman" <k-bowman@null.edu> writes:
> The new 24-bit Z-buffer device is nice for generating graphics on a
> device without a display, as is common with servers, for example. It is
> easier to configure and use than Xvfb, for example.
>
> Unfortunately, some of the default device settings are different between
> the Z-buffer device and the X-Windows device. (I haven't checked the
> WIN device because I don't have a Windows machine).

Wait, you're asking for consistency from IDL. ..... I'm having a
does-not-compute moment just now.... :-)
Re: A whine about default device settings [message #58639 is a reply to message #58636] Sun, 10 February 2008 19:18 Go to previous messageGo to next message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <MPG.221901b29e38c3ae9896b2@news.frii.com>,
David Fanning <news@dfanning.com> wrote:

> Kenneth P. Bowman writes:
>
>> Unfortunately, some of the default device settings are different between
>> the Z-buffer device and the X-Windows device. (I haven't checked the
>> WIN device because I don't have a Windows machine).
>
> Yes, this is a LONG standing problem. I think I first ran into this
> problem nearly 20 years ago. :-(
>
> Cheers,
>
> David

I ran into another similar issue later

IDL> help, !d, /str
** Structure !DEVICE, 17 tags, length=84, data length=84:
NAME STRING 'X'
X_PX_CM FLOAT 40.0000
Y_PX_CM FLOAT 40.0000

IDL> help, !d, /str
** Structure !DEVICE, 17 tags, length=84, data length=84:
NAME STRING 'Z'
X_PX_CM FLOAT 26.0000
Y_PX_CM FLOAT 26.0000

The pixels-per-centimeter parameters are read-only and cannot be set by
the user. Why that is the case for a virtual device that has no
physical size is beyond me.

This artificial difference in "resolution" means that you have to adjust
the SCALE factor on MAP_SET to make maps match when switching devices.
(I try to avoid using SCALE, but for some projections it is the best way
to make a map work right.)

Ken
Re: A whine about default device settings [message #58640 is a reply to message #58639] Sun, 10 February 2008 11:43 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth P. Bowman writes:

> Unfortunately, some of the default device settings are different between
> the Z-buffer device and the X-Windows device. (I haven't checked the
> WIN device because I don't have a Windows machine).
>
> IDL> window, xsize=1024, ysize=768
> IDL> help, !d, /str
> ** Structure !DEVICE, 17 tags, length=84, data length=84:
> NAME STRING 'X'
> X_CH_SIZE LONG 6
> Y_CH_SIZE LONG 10
> IDL> set_plot, 'z'
> IDL> device, set_resolution = [1024, 768], set_pixel_depth = 24
> IDL> help, !d, /str
> ** Structure !DEVICE, 17 tags, length=84, data length=84:
> NAME STRING 'Z'
> X_CH_SIZE LONG 8
> Y_CH_SIZE LONG 12
>
> Because IDL scales margins and plot sizes based on the character size,
> switching devices means that the resulting graphs are not identical,
> despite identical window/device sizes.
>
> This can be rectified by setting the character size of the Z-buffer
> device with
>
> DEVICE, SET_CHARACTER_SIZE = [6, 10]
>
> or doing the reverse for the X-Windows device, but this seems to me to
> be a pointless and unnecessary device dependence.
>
> I am annoyed enough to post about this because I just spend longer than
> I should have figuring out why the graphics output from the two devices
> was not identical.

Yes, this is a LONG standing problem. I think I first ran into this
problem nearly 20 years ago. :-(

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: A whine about default device settings [message #58717 is a reply to message #58630] Mon, 11 February 2008 10:34 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article
<c2b95dea-5ffe-403d-9e5e-7851aed78324@d4g2000prg.googlegroups.com>,
Bob Crawford <Snowman42@gmail.com> wrote:

> On Feb 9, 4:42�pm, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
>> The new 24-bit Z-buffer device is nice for generating graphics on a
>> device without a display, as is common with servers, for example. �It is
>> easier to configure and use than Xvfb, for example.
>>
>> Unfortunately, some of the default device settings are different between
>> the Z-buffer device and the X-Windows device. �(I haven't checked the
>> WIN device because I don't have a Windows machine).
>>
>> IDL> window, xsize=1024, ysize=768
>> IDL> help, !d, /str
>> ** Structure !DEVICE, 17 tags, length=84, data length=84:
>> � �NAME � � � � � �STRING � �'X'
>> � �X_CH_SIZE � � � LONG � � � � � � � � 6
>> � �Y_CH_SIZE � � � LONG � � � � � � � �10
>> IDL> set_plot, 'z'
>> IDL> device, set_resolution = [1024, 768], set_pixel_depth = 24
>> IDL> help, !d, /str
>> ** Structure !DEVICE, 17 tags, length=84, data length=84:
>> � �NAME � � � � � �STRING � �'Z'
>> � �X_CH_SIZE � � � LONG � � � � � � � � 8
>> � �Y_CH_SIZE � � � LONG � � � � � � � �12
>>
>
> Win (note: v6.4) values:
>
> IDL> window, xsize=1024, ysize=768
> IDL> help, !d, /str
> ** Structure !DEVICE, 17 tags, length=84, data length=84:
> NAME STRING 'WIN'
> X_CH_SIZE LONG 7
> Y_CH_SIZE LONG 10
> X_PX_CM FLOAT 32.0000
> Y_PX_CM FLOAT 32.0000
>
>
> Fun-wow! :D

Oh good, the X, Z, and WIN devices all have different default character
sizes and pixels per centimeter.

Ken
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to find continuous regions
Next Topic: IDLWAVE tab completion error

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

Current Time: Wed Oct 08 17:44:31 PDT 2025

Total time taken to generate the page: 0.00719 seconds