wait for user to draw rectangle into current image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

wait for user to draw rectangle into current image

Lucas, Falk /BDF HAM
Hi,

I just started wirting Plugins, so please forgive if this is a silly
question...

An image is shown with imp.show(), now the user should draw an rectangle
into that image.

I can draw an rectangle by code and I know how t get the x,y, width and
heigth.

But how do I get the cado to wait for the user drawn rectangle???


Thanks, in advance

Falk


_____________________  Confidentiality  _____________________

This electronic transmission is strictly confidential and intended
solely for the addressee.  It may contain information which is covered
by legal, professional or other privilege.  If you are not the intended
addressee, you must not disclose, copy or take any action in reliance
of this transmission.  If you have received this transmission in error,
please notify us and delete the received data as soon as possible.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.
_______________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: wait for user to draw rectangle into current image

dscho
Hi,

On Tue, 17 Oct 2006, Lucas, Falk /BDF HAM wrote:

> But how do I get the cado to wait for the user drawn rectangle???

You could just attach a MouseListener, and do something special when you
receive a mouse release.

However, I suspect that what you want to do could be done nicer by
expecting the user to do something after selecting the rectangle. That
way, the user can adjust the rectangle.

Hth,
Dscho