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

Home » Public Forums » archive » Re: XSTRETCH in P.Multi - is it efficient?
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: XSTRETCH in P.Multi - is it efficient? [message #30135] Sat, 06 April 2002 07:49
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
K.Y.Choi@soton.ac.uk (Reno Choi) writes:

> Now, I am trying to make widget program that contains two plot with a
> image. I also would like to include mouse-oriented indication bar in
> both plot area, which synchronise with the position of the image. I
> guess it would be based on something like XSTRETCH.pro from D.Fanning.
>
> Question are, if I put those plots and image in a simgle Widget_Draw,
> would it become much slower while interactive moving lines on plots
> are moving? I wonder this is one of reason why XSTRETCH.pro has two
> windows, i.e. two TLB.
>

I think the advantage to have two draw widgets is that you can select
coordinates in both plots simultaneously. There can only be one
active coordinate system in a single direct graphics window, so if you
have two plots, a la !P.MULTI, then only one of them will be
interactive.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: XSTRETCH in P.Multi - is it efficient? [message #30136 is a reply to message #30135] Sat, 06 April 2002 07:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Reno Choi (K.Y.Choi@soton.ac.uk) writes:

> Now, I am trying to make widget program that contains two plot with a
> image. I also would like to include mouse-oriented indication bar in
> both plot area, which synchronise with the position of the image. I
> guess it would be based on something like XSTRETCH.pro from D.Fanning.
>
> Question are, if I put those plots and image in a simgle Widget_Draw,
> would it become much slower while interactive moving lines on plots
> are moving? I wonder this is one of reason why XSTRETCH.pro has two
> windows, i.e. two TLB.

No, it would not become much slower. The reason
for two windows had to do with ease of resizing.
At the time the program was written the reliability
of the widget geometry and cross-platform sizing
issues were worse than they are now. I wished to avoid
such problems in an example program.

> In fact, since I tend to include loop that scans through the data
> range, approximately 5000 steps within 1 or 2 minutes, speed really
> matters to me. XSTRETCH continuously uses PIXMAP while moving lines
> with mouse, and I guess such processing is possibly slower in, for
> instance, 800-by-800 Widget_Draw.

No, an 800-by-800 window is piddly for modern computers.
(I'm not sure about OpenVMS computers.) And, anyway, you
don't have to copy the entire window with the Device Copy
technique, just the part of the window that needs repair.

> Alternatively, I thought three different Widget_Draws in a single TLB.
> Problem again comes when resize windows. Also, I am not sure how much
> difference in processing speed with comparison to the pervious method,
> and which method would be less complicate and more economical in
> programming-wise.

Separating three functions into three draw widgets
rather than one greatly simplifies the event handling
code, because you don't have to figure out whether the
user started in this part of the draw widget and dragged
to the other, etc. (You can think "no user would be stupid
enough to do something like that", but such thinking is
sure to doom your code.)

Resizing a window with more than one thing in it is
more complicated, but it is not onerous. You just
divide the total size up into proportional "thing" sizes
and size each thing in turn. Problems sometimes arise
when some "things" are not suppose to resize, etc. But
these things can always be worked out with intelligent
design.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@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: XSTRETCH in P.Multi - is it efficient?
Next Topic: IDL custom interpolation?

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

Current Time: Wed Oct 08 15:28:44 PDT 2025

Total time taken to generate the page: 0.00513 seconds