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

Home » Public Forums » archive » IDLgrWindow->Draw,/CREATE_INSTANCE
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: IDLgrWindow->Draw,/CREATE_INSTANCE [message #18112 is a reply to message #18032] Mon, 29 November 1999 00:00 Go to previous messageGo to previous message
Marc Schellens is currently offline  Marc Schellens
Messages: 14
Registered: November 1999
Junior Member
Oh, oh, seems that I was a litte bit rash here.
Well, with TRANSPARENT keyword it works fine for me also.

So thank you very much! I think I should come clear now.

But David, could you please specify what are the other things
(except missing /TRANSPARENT) wrong in my example code?
Well, the IDL example code uses the instancing as you in your example
code, but I found nowhere said, that it *must* be done this way (or at
least I haven't found it in the documentation), have I overseen
something?

After feeling ashamed about such an simple mistake I looked for the
original code, which made me believe for a long time, that the
DRAW_INSTANCE/CREATE_INSTANCE did not work.
(BTW: this code comes from an IDL training course held here some time
ago.)
I include it at the bottom. Please check it out.
Obviously the problem is that the IDLgrViews did not cover the whole
window here. However, under NT it works fine, but under Solaris the old
picture is not cleared before drawing it a little bit shifted.
So at least an inconsistency. (IDL 5.2)

thanks, :-) marc
------------------------------------------------------------ ------------

pro obj_win

people_a=bytarr(192,192)
people_b=people_a
openr,lun,filepath('people.dat',subdirectory='examples/data' ),/get_lun
readu,lun,people_a
readu,lun,people_b
free_lun,lun

oview_a=obj_new('idlgrview',$
viewplane_rect=[0,0,192,192],dimension=[192,192],$
zclip=[1,-1],location=[0,0])
oview_b=obj_new('idlgrview',$
viewplane_rect=[0,0,192,192],dimension=[192,192],$
zclip=[1,-1],location=[50,50])

oview_b->SetProperty,Transpar=1

omodel_a=obj_new('idlgrmodel')
omodel_b=obj_new('idlgrmodel')

oimage_a=obj_new('idlgrimage',people_a)
oimage_b=obj_new('idlgrimage',people_b)

omodel_a->add,oimage_a
omodel_b->add,oimage_b

oview_a->add,omodel_a
oview_b->add,omodel_b

owindow=obj_new('idlgrwindow',dimensions=[400,400],retain=2)

; The Keywords Create_Instance and Draw_Instance in the Draw
; method of the IDLgrWindow.

owindow->draw,oview_a,/create_instance ;The unchanging part of a
drawing.

for i=50,90,5 do begin
oview_b->setproperty,location=[i,i]
owindow->draw,oview_b,/draw_instance ;The changing part of a drawing.
endfor

end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: too many TLB resize events
Next Topic: Is there an interactive TVimage out there?

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

Current Time: Wed Oct 08 19:26:51 PDT 2025

Total time taken to generate the page: 0.00841 seconds