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

Home » Public Forums » archive » Re: user graphics drawing without prior current image knowledge
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: user graphics drawing without prior current image knowledge [message #20405] Mon, 19 June 2000 00:00
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
pdesmedt wrote:

> Hi,
>
> what is the best way in IDL to allow a user to draw graphics (ROI,
> lines)
> without having to inform IDL on which image or drawing area the drawing
> should take
> place. E.g., one gives the draw roi command, the user then draws on any
> of the visible drawing areas
> the ROI and after the program is returned the ROI coordinates AND the
> viewport ID (or image)
> is returned to the user...
>
>

Hello,

I assume that you are using a widget based application. The event
structure returned by the draw widget contains its ID.

{WIDGET_DRAW, ID:0L, TOP:0L, HANDLER:0L, TYPE: 0, X:0, Y:0, PRESS:0B,
RELEASE:0B, CLICKS:0}

If the user has a selection of draw widgets upon which to draw an ROI, you
can use the EVENT.ID value to keep track of which ID is active.

You should build an event handler (or set of handlers if you prefer) which
will be responsive to the EVENT.TYPE field (watch for press, release and
motion) events. David Fanning has a routine called ZIMAGE (and an
object based ZOOMBOX routine) on his website that provides a well
annotated example.

Good luck,

Ben


--
Ben Tupper

Bigelow Laboratory for Ocean Science
tupper@seadas.bigelow.org

pemaquidriver@tidewater.net
[Message index]
 
Read Message
Previous Topic: Re: Moving a Line
Next Topic: user graphics drawing without prior current image knowledge

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

Current Time: Fri Oct 10 13:17:14 PDT 2025

Total time taken to generate the page: 0.80148 seconds