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

Home » Public Forums » archive » Re: TVRD() and WRITE_GIF
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: TVRD() and WRITE_GIF [message #18639] Wed, 26 January 2000 00:00
Ian Dean is currently offline  Ian Dean
Messages: 26
Registered: January 2000
Junior Member
Yes, I agree with Mark, it would be nice if IDL could grab the whole
screen (or top-level widget and all sons/daughters).
It's OK to use a screen grabber, but when using multiple platforms, this
is not that easy, especially when the users may not be computer literate,
but can manage to select a button marked "Print Screen".

Regards,
Ian

Mark Buckley wrote:

> David Fanning <davidf@dfanning.com> wrote in message
> news:MPG.12f77018aba984c39899f9@news.frii.com...
>
>> All you are going to be able to get from within IDL is
>> the contents of a graphics or draw widget window. Usually
>> (thank Goodness!) this is what you want in your GIF file.
>>
>> When it is not (for example, when you want to see the
>> whole graphical user interface of a program), you will
>> have to get some kind of screen capture tool.
>
> Yup, that was my intention. We already have a grabber that we use
> (xv under Solaris) for some screenshots, I was just thinking that
> it would be nice to be able to do it from a button on the GUI, rather
> than firing up a seperate application.
>
> Ok, thanks for your help!
>
> cheers,
>
> Mark
Re: TVRD() and WRITE_GIF [message #18641 is a reply to message #18639] Tue, 25 January 2000 00:00 Go to previous message
Ivan Zimine is currently offline  Ivan Zimine
Messages: 40
Registered: February 1999
Member
Hi,

widget_control, drawID, get_value=win_id
;get_value returns window id (in direct graphics)!

wset, win_id ; make this window current

good luck
Ivan


Mark Buckley wrote:
>
> Hi,
>
> Hopefully this won't turn out to be a dozy question - I'm a bit out of
> practise on IDL at the moment.
>
> Anyway, what I'd like to do is grab a window image, so that I can write it
> out as a GIF.
>
> The difficulty I'm having is that as I'm using widgets, I'm not sure how to
> get the actual window ID for the
> the call to TVRD(), all I seem to get back is the draw widget contents.
>
> e.g.
>
> pro get_window
>
> base = widget_base(/column)
> junk = widget_label(base,value = "Hi")
> draw = widget_draw(base,xsize=200,ysize=300)
> .
> .
> widget_control,base,/realize
> widget_control,draw,get_value = draw_id
>
> res = tvrd()
> help,res
> end
>
> This just returns me an array of the draw widget (200x300), not the whole
> window.
>
> cheers,
>
> Mark


--
Ivan Zimine
Dpt. of Radiology (MRI), Geneva University Hospitals
email: ivan.zimine@physics.unige.ch
tel. : (+41 22) 372 70 70
Re: TVRD() and WRITE_GIF [message #18644 is a reply to message #18641] Tue, 25 January 2000 00:00 Go to previous message
Mark Buckley is currently offline  Mark Buckley
Messages: 7
Registered: December 1998
Junior Member
David Fanning <davidf@dfanning.com> wrote in message
news:MPG.12f77018aba984c39899f9@news.frii.com...

> All you are going to be able to get from within IDL is
> the contents of a graphics or draw widget window. Usually
> (thank Goodness!) this is what you want in your GIF file.
>
> When it is not (for example, when you want to see the
> whole graphical user interface of a program), you will
> have to get some kind of screen capture tool.

Yup, that was my intention. We already have a grabber that we use
(xv under Solaris) for some screenshots, I was just thinking that
it would be nice to be able to do it from a button on the GUI, rather
than firing up a seperate application.

Ok, thanks for your help!

cheers,

Mark
Re: TVRD() and WRITE_GIF [message #18645 is a reply to message #18641] Tue, 25 January 2000 00:00 Go to previous message
Lazzar is currently offline  Lazzar
Messages: 9
Registered: February 1999
Junior Member
If your working on a MS Windows platform an easy way to do a screen capture of
the current window is ALT-print screen. This places a copy of the current
window to the clipboard then you can just paste it into paint and save it.

Brian

Mark Buckley wrote:

> Hi,
>
> Hopefully this won't turn out to be a dozy question - I'm a bit out of
> practise on IDL at the moment.
>
> Anyway, what I'd like to do is grab a window image, so that I can write it
> out as a GIF.
>
> The difficulty I'm having is that as I'm using widgets, I'm not sure how to
> get the actual window ID for the
> the call to TVRD(), all I seem to get back is the draw widget contents.
>
> e.g.
>
> pro get_window
>
> base = widget_base(/column)
> junk = widget_label(base,value = "Hi")
> draw = widget_draw(base,xsize=200,ysize=300)
> .
> .
> widget_control,base,/realize
> widget_control,draw,get_value = draw_id
>
> res = tvrd()
> help,res
> end
>
> This just returns me an array of the draw widget (200x300), not the whole
> window.
>
> cheers,
>
> Mark
Re: TVRD() and WRITE_GIF [message #18646 is a reply to message #18641] Tue, 25 January 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Mark Buckley (mark.buckley@rl.ac.uk) writes:

> Hopefully this won't turn out to be a dozy question.

Are there dozy questions!? Well, if there are, I suppose
I specialize in answering them. They are my favorite kind. :-)

> Anyway, what I'd like to do is grab a window image, so that I can write it
> out as a GIF.

All you are going to be able to get from within IDL is
the contents of a graphics or draw widget window. Usually
(thank Goodness!) this is what you want in your GIF file.

When it is not (for example, when you want to see the
whole graphical user interface of a program), you will
have to get some kind of screen capture tool. On my
PC I like HyperSnap, which is a $25 program that you
can find out more about here:

http://www.hyperionics.com/

There are many shareware or free tools that do a similar
job. I like HyperShap because you can include pull-down
menus and the cursor in captured images. This makes it
nice for illustrating how widget programs work in HTML
documentation.

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: Re: Listing all top-level widgets
Next Topic: perimeter of a blob

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

Current Time: Wed Oct 08 15:48:02 PDT 2025

Total time taken to generate the page: 0.00334 seconds