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

Home » Public Forums » archive » Re: IDLgrWindow (?) bug
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: IDLgrWindow (?) bug [message #19126] Mon, 28 February 2000 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Pavel Romashkin (pavel@netsrv1.cmdl.noaa.gov) writes:

> To me it indicated that IDLgrWindow (or some other components of the
> graphics tree), if created outside a WIDGET_DRAW, behaved incorrectly.
> Am I misunderstanding something?

Humm. Well, obviously the bug (if there is one) is not
present in the Windows 5.3 version of IDL, because the
axes scale perfectly here.

Cheers,

David

P.S. Let's just say I'm glad Martin didn't talk me into
selling those Microsoft shares! (Although God knows after
looking at the markets this morning I wish I had sold
*everything* yesterday. :-(

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: IDLgrWindow (?) bug [message #19127 is a reply to message #19126] Mon, 28 February 2000 00:00 Go to previous message
Pavel Romashkin is currently offline  Pavel Romashkin
Messages: 166
Registered: April 1999
Senior Member
Sorry for not being explicit. "Messing up" means that the axes become
longer than they were, and extend beyond the window edges. I did not
bother preserving the font size, since I knew why the labels were distorted.
The example code does the following. If WID keyword is not set, it
creates the IDLgrWindow and adds axes to it. Axes form a nice rectangle
in the window. Then, by executing "mod_axis", I rescale horizontal axes
in that object window, while using xcoord_conv to try to preserve the
rectangle formed by the axes. Despite this, axes extend beyond the
limits of the window. I was not interested in what labels were doing, I
know about recompute=2 but did not put it in the sample code.
Then, "test" can be executed with /WID. This forces creation of a
WIDGET_DRAW object window, with the same four axes in it, forming a nice
rectangle. Then, when "mod_axis" is executed on these objects, the
scaling of horizontal axes changes properly and their length remains the
same, just as it should be. Labels, again, were not the concern.

To me it indicated that IDLgrWindow (or some other components of the
graphics tree), if created outside a WIDGET_DRAW, behaved incorrectly.
Am I misunderstanding something?

Cheers,
Pavel

David Fanning wrote:
>
> Humm. Could be. I couldn't really make heads or tails
> out of your example code, so I couldn't really decide
> what I was suppose to be looking for.
> * * * snip-snip
> But maybe your question extents beyond this detail. If
> so, let me know.
>
> Cheers,
>
> DavidP
Re: IDLgrWindow (?) bug [message #19129 is a reply to message #19126] Mon, 28 February 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Pavel Romashkin (pavel@netsrv1.cmdl.noaa.gov) writes:

> I think there is a bug in the way IDL creates an independent object
> graphics window. Once you change things in it, the viewport (or
> something else) changes, messing the displayed axes up. Try the code at
> the bottom of this message. I use PPC IDL 5.2 and tried it in PPC IDL 5.3.

Humm. Could be. I couldn't really make heads or tails
out of your example code, so I couldn't really decide
what I was suppose to be looking for.

I'm not sure what "messing the displayed axes up" means.
I notice you are not recomputing the axis text objects
character dimensions, which would certainly mess the
displayed axes up after you changed either the viewport
or the axis range. I would do something like this:

x_axis = obj_new('IDLgrAxis', 0, ticklen=0.03, name='X_AXIS', $
location=[1000, 0, 0], /exact)
x_axis->GetProperty, TickText=xtextObject
xtextObject->SetProperty, Recompute_Dimensions=2

But maybe your question extents beyond this detail. If
so, let me know.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL enhancements (was Re: idl2matlab translate-o-matic)
Next Topic: Re: object graphics colormap bug ?

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

Current Time: Fri Oct 10 13:41:14 PDT 2025

Total time taken to generate the page: 1.28135 seconds