Thread Subject: How to warp the mouse pointer position

Subject: How to warp the mouse pointer position

From: Leandra Vicci

Date: 2 Jan, 2009 13:42:02

Message: 1 of 3

I wish to snap the mouse pointer to the exact coordinates of a known point in the active axes. X Windows has a function for such purposes, but I can't find an equivalent Matlab graphics function. Does one exist? If not, are there primitives I could use to write one? The axes CurrentPoint, CurrentPoint.x, and CurrentPoint.y properties are read-only, so I can't just set them.

Subject: How to warp the mouse pointer position

From: Jiro Doke

Date: 2 Jan, 2009 16:47:01

Message: 2 of 3

"Leandra Vicci" <vicci@cs.unc.edu> wrote in message <gjl5j9$acj$1@fred.mathworks.com>...
> I wish to snap the mouse pointer to the exact coordinates of a known point in the active axes. X Windows has a function for such purposes, but I can't find an equivalent Matlab graphics function. Does one exist? If not, are there primitives I could use to write one? The axes CurrentPoint, CurrentPoint.x, and CurrentPoint.y properties are read-only, so I can't just set them.
>

You can use the 'PointerLocation' property of the root (0), in conjunction with figure position and axes position.

jiro

Subject: How to warp the mouse pointer position

From: Leandra Vicci

Date: 2 Jan, 2009 17:18:02

Message: 3 of 3

"Jiro Doke" <jiro.doke@mathworks.com> wrote in message <gjlge5$r86$1@fred.mathworks.com>...
> "Leandra Vicci" <vicci@cs.unc.edu> wrote in message <gjl5j9$acj$1@fred.mathworks.com>...
> > I wish to snap the mouse pointer to the exact coordinates of a known point in the active axes. X Windows has a function for such purposes, but I can't find an equivalent Matlab graphics function. Does one exist? If not, are there primitives I could use to write one? The axes CurrentPoint, CurrentPoint.x, and CurrentPoint.y properties are read-only, so I can't just set them.
> >
>
> You can use the 'PointerLocation' property of the root (0), in conjunction with figure position and axes position.
>
> jiro
YES! It works perfectly. Thanks, Jiro.
Sincerely,
    -- Lea

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
pointer location Jiro Doke 2 Jan, 2009 11:50:09
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com