| iTools screenshots [message #45299] |
Wed, 31 August 2005 13:52  |
mjfinch@gmail.com
Messages: 1 Registered: August 2005
|
Junior Member |
|
|
What I would like to do is fire up an iTool, get a screen grab, and
close the iTool. The problem I keep running into is that the iTools
don't seem to want to render anything until the program flow has
returned to the top level.
This procedure "RenderTest" works perfect in IDL 6.2, but not in 6.1
The jpeg it writes is just all white because nothing was rendered when
the screen grab was taken...
Any ideas on how to do this with 6.1.1 ?
Thanks,
Mike Finch
Pro RenderTest
image =INDGEN(720,360, /FLOAT)
iImage, image
void = itGetCurrent(TOOL=oTool)
windowObj = oTool -> GetCurrentWindow()
oWriter = oTool->getService("WRITE_FILE")
success = oWriter->WriteFile('c:\autoRenderTest', $
windowObj, SCALE_FACTOR=1.0, $
WRITER='/REGISTRY/SETTINGS/FILE WRITERS/JOINT PHOTOGRAPHIC EXPERTS
GROUP')
idExit = oTool->FindIdentifiers('*exit', /OPERATIONS)
success = oTool->DoAction(idExit)
End
|
|
|
|
| Re: iTools screenshots [message #45375 is a reply to message #45299] |
Fri, 02 September 2005 14:54  |
AEO
Messages: 5 Registered: September 2003
|
Junior Member |
|
|
Not sure if it helps, but this works :
PRO iTools_Clipboard
iImage, DIST(300), DIMENSIONS=[400,400]
void=itGetCurrent(TOOL=oTool)
oWin=oTool->GetCurrentWindow()
oView=oWin->GetCurrentView()
idSelect=oTool->FindIdentifiers('*SELECTALL',/OPERATIONS)
void=oTool->DoAction(idSelect)
idCopy=oTool->FindIdentifiers('*COPY',/OPERATIONS)
void=oTool->DoAction(idCopy)
oWin->ClearSelections
oClipboard=OBJ_NEW('IDLgrClipboard',DIMENSIONS=[400,400],$
GRAPHICS_TREE=oView)
oClipboard->Draw,FILENAME='C:\clipboard.bmp'
OBJ_DESTROY,oClipboard
idExit=oTool->FindIdentifiers('*EXIT',/OPERATIONS)
void=oTool->DoAction(idExit)
END
|
|
|
|