Re: Persistent Object Graphics Not Persistent in Resizeable Windows [message #9157] |
Wed, 11 June 1997 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Stein Vidar writes:
> David Fanning wrote:
>>
>> I've run into a problem in which I lose all my axes labeling
>> if I resize my draw widget object window before evoking the
>> Draw method of the window. Here is a bug report and some
>> sample code to see the problem. (Those of you who want to
>> see how to add axes to a surface plot, take note. :-))
>
> This posting has kept me scratching my head for quite a
> while.
>
> I've tested the program that was attatched, on a machine
> with !version = { alpha OSF unix 5.0 Apr 28 1997}
> and my problem is that I can't figure out what the problem
> is/was... I can't see any difference between the plot before
> and after resizing... What *was* the problem - did the
> axes disappear, did the axes *values* disappear, or what..
What happened on my machine is that the axis labelling
disappeared, although not the axes themselves, when the
window was resized.
> In toying around with it I even managed to get IDL into
> a state where it didn't process any resizing events at
> all, though I can't reproduce that state... calling
> xmanager didn't do anything (though since this is a non-
> blocking widget I guess it shouldn't..) Hope this doesn't
> happen often...might have been me doing something strange..
I've noticed this myself, but like you, I can't reproduce
it. I've even had random crashes just from closing object
windows, but I can't reproduce that in a reliable way
either. It seems to have gone away now that I know a little
more what I am doing. :-)
> Also, I can't help but feeling that the redraw is quite
> slow compared to "direct" graphics... Is this something
> other people notice as well?
I think in general object redraw will be slower than
direct graphic redraw. This is due to the fact that
objects must be rendered or sent through the graphics
system each time. I have not noticed in the simple
things I have done so far that speed is much of an
issue.
> And what on earth does the retain state have to do with
> whether or not axes are appearing correctly or not..?
Well, exactly! The IDL documentation certainly warns
you that retaining object windows is not recommended,
but they don't tell you that weird things will happen
if you choose to ignore their recommendations.
> Utterly confused...
Welcome to the club! :-)
Although I will say that I think I have the darn
view rectangle thing figured out finally. When I
put an axis on a plot I am about 90% sure where it
is going to show up now. That's progress!
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Customizable IDL Programming Courses
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
IDL 5 Reports: http://www.dfanning.com/documents/anomaly5.html
|
|
|