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

Home » Public Forums » archive » Re: CW_ZOOM problem
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: CW_ZOOM problem [message #56704] Sat, 10 November 2007 17:43
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kerber80@gmail.com writes:

> My program open image file (user pick which one from menu)
> for menu i have events and processing it in event handler
>
> only after it i have image size
> but ZOOM widget realized before it... So how "re-build" widget for
> image size ?

Ah, well, the author of this program didn't anticipate
this kind of situation. :-)

Here is my suggestion. Modify the ZOOM_SET_VALUE procedure
to allow you to pass not just a new image, but new draw
widget sizes, too. (You will have to make the "value"
a structure, probably.) Then, just modify the draw widgets
(you can find their IDs in the state structure) with your
new values.

Or, you could write your own code as a widget object
and do it right. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: CW_ZOOM problem [message #56705 is a reply to message #56704] Sat, 10 November 2007 15:56 Go to previous message
kerber80 is currently offline  kerber80
Messages: 3
Registered: November 2007
Junior Member
Sorry question was not little correct

My program open image file (user pick which one from menu)
for menu i have events and processing it in event handler

only after it i have image size
but ZOOM widget realized before it... So how "re-build" widget for
image size ?

Thanks
Re: CW_ZOOM problem [message #56706 is a reply to message #56705] Sat, 10 November 2007 13:31 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kerber80@gmail.com writes:

> i want use CW_ZOOM in my program. As i looked in IDL online help
> CW_ZOOM must have XSIZE and YSIZE equal zoomed image dimensions.
>
> Example in documentation very nice, but i don't know what size of
> image user choose ?
> Does it possible to define XSIZE and YSIZE at runtime ?

The example *shows* XSIZE and YSIZE being defined at
runtime!

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: CW_ZOOM problem [message #56708 is a reply to message #56706] Sat, 10 November 2007 13:29 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Nov 10, 3:19 pm, kerbe...@gmail.com wrote:
> Good day everyone
>
> i want use CW_ZOOM in my program. As i looked in IDL online help
> CW_ZOOM must have XSIZE and YSIZE equal zoomed image dimensions.
>
> Example in documentation very nice, but i don't know what size of
> image user choose ?
> Does it possible to define XSIZE and YSIZE at runtime ?
>
> Best wishes

Just like in the documentation use size() to find the dimensions and
pass them via the xsize and ysize keywords.

sz = size(image,/dimensions)
base = widget_base(/column)
result = cw_zoom(base,xsize=sz[0],ysize=sz[1],uvalue='ZOOM')
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: CW_ZOOM problem
Next Topic: Re: IDL T-Shirt Has Arrived!

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

Current Time: Fri Oct 10 12:06:36 PDT 2025

Total time taken to generate the page: 0.79937 seconds