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

Home » Public Forums » archive » Printing a collection of widget items
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: Printing a collection of widget items [message #49560 is a reply to message #49502] Thu, 03 August 2006 07:27 Go to previous message
mmiller3 is currently offline  mmiller3
Messages: 81
Registered: January 2002
Member
>>>> > "Ryan" == Ryan <rchughes@brutus.uwaterloo.ca> writes:

> Thanks for your response but all my draw widgets are
> indicator lights (only 1 of 5 colors) for about 30
> different things so putting the labels on manually would
> not be feasible. It would be better for me to spend my
> time writing something where all the indicators are written
> directly to a postscript file. I am using IDL on UNIX and
> have the plotting set to X windows. Thanks for the
> suggestion though.

Ryan,

Here's a procedure that uses import (from ImageMagick) to capture
a top level base. It helps to know the title of the base widget
as well as the widget id - then it is entirely automatic.
Otherwise you'll need to select the window with the mouse. (does
anyone know how to get the title of a base widget in IDL?)

Note that the type of file that you are capturing to is
determined by the extension of the filename: .ps for postscript,
.pdf for pdf, .jpg for jpeg, and so on.

Hope this helps, Mike


pro import_tlb, widget_id, filename, title=title
;; Bring the widget to the front:
widget_control, widget_id, iconify=0

;; If we know the window title, then capture it directly, otherwise
;; use what the user selects:
if n_elements(title) eq 1 then begin
cmnd = 'import -screen -window "' + title + '" ' + filename
endif else begin
cmnd = 'import -screen ' + filename
endelse
spawn, cmnd, result
print, result
end

--
Michael A. Miller mmiller3@iupui.edu
Imaging Sciences, Department of Radiology, IU School of Medicine
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: ellipsoid 3D
Next Topic: Re: Reading in a postscript file into IDL

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

Current Time: Wed Oct 08 16:09:31 PDT 2025

Total time taken to generate the page: 0.00416 seconds