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

Home » Public Forums » archive » UNsharing an IDLgrImage
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
UNsharing an IDLgrImage [message #85344] Sat, 27 July 2013 16:07 Go to previous message
kagoldberg is currently offline  kagoldberg
Messages: 26
Registered: November 2012
Junior Member
Here's a strange object graphics quirk, I hope someone can explain. An IDLgrImage object can share its data with another IDLgrImage object. But what happens when you want to quit sharing, and unlink the two? Unless I missed something, it seems that you cannot.

Here's an example where we (1) define an image and draw it. (2) share with another image, and draw that. (3) attempt to unshare, set new data to the image, and draw it (it works). (4) modify the original share image, and observe that it is still linked to the first, with the ability to change it. After each 'stop' use '.c' or '.continue' to proceed to the next step.

How does one break the connection and un-share without destroying the second IDLgrImage?
Thanks!

EXAMPLE CODE

oWindow = IDLgrWindow(dimensions=[500,500])
oView = IDLgrView(EYE=1000, COLOR=[50,100,50], DIMENSIONS=[500,500], VIEWPLANE_RECT=[0,0,500,500])
oModel = IDLgrModel()
oView.Add, oModel

oImage = IDLgrImage(bindgen(16,16), LOCATION=[0,0], DIMENSION=[256,256], /GREYSCALE)
oModel.Add, oImage

oWindow.Draw, oView & print, 'A, here we see the bindgen ramp'

stop

oIshare = IDLgrImage(bytscl(randomn(seed,16,16)))
oImage.SetProperty, SHARE_DATA=oIshare ;--- see the shared image
oWindow.Draw, oView & print, 'B, now we see the shared randomness'

stop

oImage.SetProperty, SHARE_DATA=!null, DATA=bytscl(dist(16,16)) ;--- see the dist()
oWindow.Draw, oView & print, 'C, we replace the share with dist() data'

stop

oIshare.SetProperty, DATA=255b-bindgen(16,16)
oWindow.Draw, oView & print, 'D, change the oIshare and it STILL affects the oImage'

end
[Message index]
 
Read Message
Read Message
Previous Topic: Plot with axis and labels with different colors
Next Topic: Plot curved line on a globe projection

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

Current Time: Wed Oct 08 19:33:17 PDT 2025

Total time taken to generate the page: 0.00468 seconds