IDLgrView question [message #83793] |
Tue, 02 April 2013 10:57  |
Russell Ryan
Messages: 122 Registered: May 2012
|
Senior Member |
|
|
Hi gang,
I've been developing this GUI to display/process images and I'm using the object-oriented graphics. Everything is going great, but I'd like to set the background of the View to be a repeating image or pattern. I know I can set it to a flat color (I'm using [192,192,192] so it blends in with the standard IDL GUI background), but I'd like to do something like a series of diagonal lines (so it's more obvious where the image boundary is). I'm imagining something like polyfill with /line_fill set, but obviously it must be integrated into the OOGs. I know about the IDLgrPattern object which I could set to an IDLgrPolygon, but then every time I pan/zoom the image I'd have to reset the position/size of the polygon. That seems pretty tedious, and I was hoping there was a better way...
Any ideas on how to do this?
Thanks!
Russell
|
|
|
Re: IDLgrView question [message #84425 is a reply to message #83793] |
Sun, 02 June 2013 15:13  |
Russell Ryan
Messages: 122 Registered: May 2012
|
Senior Member |
|
|
On Friday, May 31, 2013 1:35:41 PM UTC-4, Jim P wrote:
> On Tuesday, April 2, 2013 11:57:29 AM UTC-6, rr...@stsci.edu wrote:
>
>> Hi gang,
>
>>
>
>>
>
>>
>
>> I've been developing this GUI to display/process images and I'm using the object-oriented graphics. Everything is going great, but I'd like to set the background of the View to be a repeating image or pattern. I know I can set it to a flat color (I'm using [192,192,192] so it blends in with the standard IDL GUI background), but I'd like to do something like a series of diagonal lines (so it's more obvious where the image boundary is). I'm imagining something like polyfill with /line_fill set, but obviously it must be integrated into the OOGs. I know about the IDLgrPattern object which I could set to an IDLgrPolygon, but then every time I pan/zoom the image I'd have to reset the position/size of the polygon. That seems pretty tedious, and I was hoping there was a better way...
>
>>
>
>>
>
>>
>
>> Any ideas on how to do this?
>
>>
>
>>
>
>>
>
>> Thanks!
>
>>
>
>> Russell
>
>
>
> I just ran across this old post. Perhaps the interest has been lost, but one way to accomplish this is through instance rendering of views.
>
>
>
> I used a trick like this back when IDL 5.0 was being developed for a demo. It's still in the distribution, but no one's updated it recently so it doesn't look the very best anymore.
>
>
>
> IDL> d_uscensus, /backdrop
>
>
>
> Search for the string "backdrop" in the source:
>
>
>
> IDL> .compile d_uscensus
>
>
>
> Keep in mind that this demo was developed simultaneously with the creation of the Object Graphics system's API itself, so there may be new and improved ways of accomplishing this task.
>
>
>
> Specific IDL help items to peruse are the CREATE_INSTANCE and DRAW_INSTANCE keywords to IDLgrWindow, and the TRANSPARENT property of IDLgrView.
>
>
>
> Jim P.
Jim,
Hmm.... That certainly looks promising. I was fooling around with view instancing for something else, I guess it never occurred to me that I might be able to do this. I'll have a try at something like this....
Thanks!
Russell
|
|
|
Re: IDLgrView question [message #84436 is a reply to message #83793] |
Fri, 31 May 2013 10:35  |
Jim Pendleton
Messages: 165 Registered: November 2011
|
Senior Member |
|
|
On Tuesday, April 2, 2013 11:57:29 AM UTC-6, rr...@stsci.edu wrote:
> Hi gang,
>
>
>
> I've been developing this GUI to display/process images and I'm using the object-oriented graphics. Everything is going great, but I'd like to set the background of the View to be a repeating image or pattern. I know I can set it to a flat color (I'm using [192,192,192] so it blends in with the standard IDL GUI background), but I'd like to do something like a series of diagonal lines (so it's more obvious where the image boundary is). I'm imagining something like polyfill with /line_fill set, but obviously it must be integrated into the OOGs. I know about the IDLgrPattern object which I could set to an IDLgrPolygon, but then every time I pan/zoom the image I'd have to reset the position/size of the polygon. That seems pretty tedious, and I was hoping there was a better way...
>
>
>
> Any ideas on how to do this?
>
>
>
> Thanks!
>
> Russell
I just ran across this old post. Perhaps the interest has been lost, but one way to accomplish this is through instance rendering of views.
I used a trick like this back when IDL 5.0 was being developed for a demo. It's still in the distribution, but no one's updated it recently so it doesn't look the very best anymore.
IDL> d_uscensus, /backdrop
Search for the string "backdrop" in the source:
IDL> .compile d_uscensus
Keep in mind that this demo was developed simultaneously with the creation of the Object Graphics system's API itself, so there may be new and improved ways of accomplishing this task.
Specific IDL help items to peruse are the CREATE_INSTANCE and DRAW_INSTANCE keywords to IDLgrWindow, and the TRANSPARENT property of IDLgrView.
Jim P.
|
|
|