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

Home » Public Forums » archive » Re: Saving & replaying direct graphics commands (was Re: Top 10 IDL Requests)
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: Saving & replaying direct graphics commands (was Re: Top 10 IDL Requests) [message #20960] Tue, 01 August 2000 00:00
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"David Fanning" <davidf@dfanning.com> wrote in message
news:MPG.13efb1c941a32b12989b8e@news.frii.com...
> Mark Hadfield (m.hadfield@niwa.cri.nz) writes:
>
>> owin = obj_new('xzwindow')
>> owin->plot, 'plot', findgen(11)
>> owin->plot, 'oplot', 0.1*findgen(11)^2, LINESTYLE=1
>> owin->plot, 'oplot', sqrt(10.*findgen(11)), LINESTYLE=2, COLOR=3
>
> I've written exactly this kind of thing (on more than
> one occasion, I think). But I always get half finished
> and then I'm distracted by something seemingly more
> important. But I use my LinkedList object to store
> the commands. I even had a "command editor" working,
> where you could add or delete commands, move them
> around, etc.

My main obstacles to finishing this have been: 1) I don't use direct
graphics much, 2) I'm not sure of usefulness. But a command editor would be
a really cool thing!

I strongly favour storing the commands as objects defined specifically for
the purpose. Then you can give them as much intelligence as you want and you
can store them in an IDL_Container. I'm not 100% sure whether it's better to
execute a command by calling an Execute (or whatever) method or by having
the caller pulling out the data and then using
call_procedure/call_function/execute . The former seems cleaner to me but
the latter has the advantage(?) that all the commands are executed in the
same scope. It depends whether you want to be able to handle things like

owin->plot, 'openr, lun, filename, /GET_LUN', /EXECUTE
owin->plot, 'readu, lun, x', /EXECUTE
owin->plot, 'free_lun, lun, /GET_LUN', /EXECUTE
owin->plot, 'plot, x', /EXECUTE

...probably not.

And then when you think about it, there already is a command editor in IDL,
it's the one you use to write functions, procedures & scripts, so why not
wrap up all your plotting commands in a single procedure a la XWINDOW.

Open-mindedly yours...
---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Record Day on IDL Newsgroup
Next Topic: Saving & replaying direct graphics commands (was Re: Top 10 IDL Requests)

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

Current Time: Fri Oct 10 04:43:25 PDT 2025

Total time taken to generate the page: 0.80107 seconds