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

Home » Public Forums » archive » Re: get image from widget_draw
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: get image from widget_draw [message #54246] Fri, 01 June 2007 04:15 Go to next message
Jo Klein is currently offline  Jo Klein
Messages: 54
Registered: January 2006
Member
Your image variable doesn't persist between executions of pic_event. Put
a breakpoint in and see how the content of it vanishes. The
quick-and-dirty solution is to store it in a common block (sorry David
:) ), but there are better approaches e.g. storing your data in a uvalue.
Jo
Re: get image from widget_draw [message #54250 is a reply to message #54246] Fri, 01 June 2007 01:05 Go to previous messageGo to next message
skymaxwell@gmail.com is currently offline  skymaxwell@gmail.com
Messages: 127
Registered: January 2007
Senior Member
i saved image through TVRD function. Now i want output it to my
widget_draw. Use TVSCL (also try TV) procedure. My widget_draw become
full black color. in IDLDE i haven't any errors. so here is part of my
source code

PRO PIC_EVENT

WIDGET_CONTROL,pic,GET_VALUE=w_ID
WIDGET_CONTROL,event.id,GET_UVALUE=widget
WSET,w_ID
image=MAKE_ARRAY(3,600,400)
...

IF (widget EQ 'button_save') THEN BEGIN
image=TVRD(TRUE=1)
help,image
ENDIF

IF (widget EQ 'button_show') THEN BEGIN
TVSCL,image,TRUE=1
ENDIF
END
Re: get image from widget_draw [message #54251 is a reply to message #54250] Thu, 31 May 2007 18:16 Go to previous messageGo to next message
Jim Pendleton is currently offline  Jim Pendleton
Messages: 13
Registered: July 2001
Junior Member
<skymaxwell@gmail.com> wrote in message
news:1180636301.310368.117810@o5g2000hsb.googlegroups.com...
> hello
> how get image from widget_draw ?
>

There's a utility on the ITT IDL codebank for copying a draw widget to the
system clipboard, if
that's what you're looking for. See

http://www.ittvis.com/codebank/search.asp?FID=372

Jim P.
Re: get image from widget_draw [message #54254 is a reply to message #54251] Thu, 31 May 2007 11:55 Go to previous messageGo to next message
Jo Klein is currently offline  Jo Klein
Messages: 54
Registered: January 2006
Member
WSET to its window id, then use TVRD or TVREAD.
Jo
Re: get image from widget_draw [message #54376 is a reply to message #54246] Fri, 01 June 2007 11:13 Go to previous message
skymaxwell@gmail.com is currently offline  skymaxwell@gmail.com
Messages: 127
Registered: January 2007
Senior Member
i'm not sure...you mean this one ?


IF (widget EQ 'button_save') THEN BEGIN
;image=TVRD(TRUE=1)
WIDGET_CONTROL,pic,GET_UVALUE=image
;help,image

ENDIF

IF (widget EQ 'button_show') THEN BEGIN
;TVSCL,image,TRUE=1
WIDGET_CONTROL,pic,SET_UVALUE=image
ENDIF
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Widget_text issue
Next Topic: auto-managed compound widgets

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

Current Time: Wed Oct 08 13:41:51 PDT 2025

Total time taken to generate the page: 0.00561 seconds