From: Nick Stokes on 11 May 2010 13:38 Hi, Is there a way to detect which object (line, patch, etc..) is at a given cursor position?
From: us on 11 May 2010 15:38 "Nick Stokes" <nickstokes5(a)gmail.com> wrote in message <hsc4ls$avn$1(a)fred.mathworks.com>... > Hi, > > Is there a way to detect which object (line, patch, etc..) is at a given cursor position? show an example... us
From: Steven Lord on 11 May 2010 17:07 "us " <us(a)neurol.unizh.ch> wrote in message news:hscbms$b5q$1(a)fred.mathworks.com... > "Nick Stokes" <nickstokes5(a)gmail.com> wrote in message > <hsc4ls$avn$1(a)fred.mathworks.com>... >> Hi, Is there a way to detect which object (line, patch, etc..) is at a >> given cursor position? > > show an example... .... and explain what you'd like to occur if there is no object at a given cursor position, or if there are multiple objects at the cursor position. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: Walter Roberson on 11 May 2010 17:38 Steven Lord wrote: > "us " <us(a)neurol.unizh.ch> wrote in message > news:hscbms$b5q$1(a)fred.mathworks.com... >> "Nick Stokes" <nickstokes5(a)gmail.com> wrote in message >> <hsc4ls$avn$1(a)fred.mathworks.com>... >>> Hi, Is there a way to detect which object (line, patch, etc..) is at a >>> given cursor position? >> show an example... > > ... and explain what you'd like to occur if there is no object at a given > cursor position, or if there are multiple objects at the cursor position. I interpret the question as one of asking, "Is there a way to tell which object would be selected or activated if one were to click at a given cursor position?" -- which must be possible to find out in theory because Matlab has to do the same kind of computation if a click is actually done. On the other hand, if that _is_ the question, then one starts getting into issues about objects whose hittest is off, as the top-most visible object is not necessarily the object that is active at that cursor location. And if one is working with a 3D axis, then one must figure out which Z coordinate is the desired one; in particular, one must know whether one wants to intersect perpendicular to the viewing axis or if one wants to intersect perpendicular to the screen, or to phrase it differently, whether to treat the cursor position as 2 dimensional or 3 dimensional.
From: Nick Stokes on 11 May 2010 18:15
Walter Roberson <roberson(a)hushmail.com> wrote in message > I interpret the question as one of asking, "Is there a way to tell which > object would be selected or activated if one were to click at a given cursor > position?" -- which must be possible to find out in theory because Matlab has > to do the same kind of computation if a click is actually done. > yes, that is exactly what I am asking. > On the other hand, if that _is_ the question, then one starts getting into > issues about objects whose hittest is off, > [...] These are details, not really that pertinent. Let's assume easiest set or whatever matlab assumes when it determines CurrentObject of the figure. |