Thread Subject: Ginput crosshair color control

Subject: Ginput crosshair color control

From: Dave Robinson

Date: 23 Nov, 2009 16:52:06

Message: 1 of 4

Hi Guys

I have just developed a very nice GUI and use the 'ginput' function in order to select some anchor points on a plot. It works exactly how I want, however the users of the software who are wearing Laser protective goggles complain they cannot see the crosshairs easily.

The obvious choice is to simply change the colour of the crosshairs to one they can see, but I must be having a senior moment, search as can, I cannot find any such control. Any guru out there know whether

a) It is impossible.

b)They can point me in the right direction to do it to it.

Thanks

Dave Robinson

Subject: Ginput crosshair color control

From: jrenfree

Date: 23 Nov, 2009 18:38:19

Message: 2 of 4

On Nov 23, 8:52 am, "Dave Robinson" <dave.robin...@somewhere.biz>
wrote:
> Hi Guys
>
> I have just developed a very nice GUI and use the 'ginput' function in order to select some anchor points on a plot. It works exactly how I want, however the users of the software who are wearing Laser protective goggles complain they cannot see the crosshairs easily.
>
> The obvious choice is to simply change the colour of the crosshairs to one they can see, but I must be having a senior moment, search as can, I cannot find any such control. Any guru out there know whether
>
> a) It is impossible.
>
> b)They can point me in the right direction to do it to it.
>
> Thanks
>
> Dave Robinson

Maybe you could subsequently use the text command to plot a crosshair
at the x and y-coordinates that would overlay the ginput crosshairs
with the color that you desire. Just an idea

Subject: Ginput crosshair color control

From: ImageAnalyst

Date: 23 Nov, 2009 20:55:19

Message: 3 of 4

Dave:
The cross hairs do seem to change color within the image depending on
what color they are over. It would seem like this should maximize
contrast, not to mention the fact that the crosshairs extend outside
the image with good contrast plus the arrowhead is still there. I'm
not sure why they can't see it. I tried 'LineWidth' and 'Forecolor'
and it doesn't seem to allow these kinds of properties.

The only way I can see to do it is to use the line command and then
have scrollbars to control where you drew the lines (that form the
crosshairs). Then you could get the width and color you need but of
course it's less interactive than just pointing and clicking because
they need to use scrollbars. Maybe you could also use the mousemove
event to use the line() function to draw crosshairs - I'd have to
experiment around with that to get the right set of commands, located
in the correct function callbacks or control properties but I'm sure
it's do-able.
Best wishes,
ImageAnalyst

Subject: Ginput crosshair color control

From: Dave Robinson

Date: 24 Nov, 2009 11:00:18

Message: 4 of 4

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <b0f19e3c-5861-4adf-be36-c49011f6420d@j9g2000vbp.googlegroups.com>...
> Dave:
> The cross hairs do seem to change color within the image depending on
> what color they are over. It would seem like this should maximize
> contrast, not to mention the fact that the crosshairs extend outside
> the image with good contrast plus the arrowhead is still there. I'm
> not sure why they can't see it. I tried 'LineWidth' and 'Forecolor'
> and it doesn't seem to allow these kinds of properties.
>
> The only way I can see to do it is to use the line command and then
> have scrollbars to control where you drew the lines (that form the
> crosshairs). Then you could get the width and color you need but of
> course it's less interactive than just pointing and clicking because
> they need to use scrollbars. Maybe you could also use the mousemove
> event to use the line() function to draw crosshairs - I'd have to
> experiment around with that to get the right set of commands, located
> in the correct function callbacks or control properties but I'm sure
> it's do-able.
> Best wishes,
> ImageAnalyst

Hi guys

thanks for your response - it is much appreciated.

What I have currently done is to download a copy of 'myginput' from the File exchange, and converted my crosshair cursor with a much more visible cursor shape, and this seems to be doing it for me.

Regards

Dave Robinson

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com