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

Home » Public Forums » archive » Re: string animations etc.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: string animations etc. [message #40975 is a reply to message #40965] Sun, 19 September 2004 23:51 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
KL writes:

> I was trying to do a simple string animation whereby there is a
> running number printed i.e. a number eg. of the form xxxx.xx that gets
> updated continuously next to some plot in the display window (as
> opposed to jumping discretely) while the program is crunching away in
> a 'for loop'. Does any one have ideas on how I may do this?
>
> Also, this program calculates the path of some object thru' space. I'd
> like to be able to have this line drawn in real-time in the display
> window, corresponding to the running number.

A technique I have used in the past is to create a very small
pixmap window that I can erase and write a number in. Then I
just copy the pixmap window to the display window with a
Device, Copy command. In the FOR loop, the code looks like
this:

FOR j=0,n DO BEGIN
... ; Whatever you are doing.
WSet, pixmapWindow
Erase
XYOUTS, StrTrim(j,2), 0.5, 0.5, Alignment=0.5, /Normal
WSet, displayWindow
DEVICE, COPY=[0, 0, 25, 25, 0, 0, pixmapWindow]
ENDFOR

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Irregularly Lat Lon Grid: Displaying Land Types
Next Topic: xinteranimate and string

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

Current Time: Sat Oct 11 00:26:13 PDT 2025

Total time taken to generate the page: 1.35704 seconds