[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chosing points along an image row with mouse



Kim Nielsen writes:
 
> I would like to know if there is a way to get the mouse to only move
> along a row (or column). I have an image and need to pick two points
> along the same row. Is there a way to get the mouse only to move along
> a row ?

You can look at an example like ZPLOT to see
a widget program that draws an arrow along
the initially selected row. This is not the
best program I've ever written, and I write
my event handlers differently now, but it will
give you a place to start anyway. I'm working
with a plot, but you will get the idea I think.
It is much simpler with an image.

You will need these two old programs:

   http://www.dfanning.com/programs/zplot.pro
   http://www.dfanning.com/programs/getcolor.pro

(ZPLOT allows you to zoom into a line plot.
The arrow is used to show you the extend of the
plot you will be zooming.)

Cheers,

David
-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155