comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Function graphics cursor
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Function graphics cursor [message #86605] Fri, 22 November 2013 06:14 Go to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
Hi,
I would like to place markers on an Image(). Unfortunately, normally the cursor looks like an arrow on the function graphic images. I would like to modify its appearance to something like a crosshair (that is the standard in direct graphics). I could not find something for object graphics that resembles the command
device, /crosshair
Anyone knows if this is possible?

Regards,
Helder
Re: Function graphics cursor [message #86607 is a reply to message #86605] Fri, 22 November 2013 06:33 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Helder writes:

> I would like to place markers on an Image(). Unfortunately, normally the cursor looks like an arrow on the function graphic images. I would like to modify its appearance to something like a crosshair (that is the standard in direct graphics). I could not find something for object graphics that resembles the command
> device, /crosshair
> Anyone knows if this is possible?

Try REGISTER_CURSOR.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Function graphics cursor [message #86616 is a reply to message #86607] Fri, 22 November 2013 14:13 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Friday, November 22, 2013 3:33:16 PM UTC+1, David Fanning wrote:
> Helder writes:
>
>
>
>> I would like to place markers on an Image(). Unfortunately, normally the cursor looks like an arrow on the function graphic images. I would like to modify its appearance to something like a crosshair (that is the standard in direct graphics). I could not find something for object graphics that resembles the command
>
>> device, /crosshair
>
>> Anyone knows if this is possible?
>
>
>
> Try REGISTER_CURSOR.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Hi David,
thank as usual for the suggestion. In the meanwhile I was on a train and I looked more into the problem. The thing is that if I draw an object (a cross) on an object (an image), the mouse changes to all the possible shapes (to change size and position). This was pretty annoying. So I found a way around this and instead of drawing a cross, I'm now drawing a circle with 4 lines pointing to the center without reaching it. This way I get the crosshair pointer and don't get close enough to the object to get annoyed by changes in cursor.

For completeness, here is how I draw this positioning object (the coordinates part is a bit confusing, but I don't want to post the even more confusing rest of the code!)

DevCoords = (*self.win1).ConvertCoord([self.Coords[0],self.Coords[2]], [self.Coords[1], self.Coords[3]], /DATA, /TO_DEVICE)
*self.cObj1[0] = POLYLINE([DevCoords[0,I]-self.dCross, DevCoords[0,I]-(self.dCross/2)], [DevCoords[1,I], DevCoords[1,I]], '-r2', TARGET=(*self.win1), /DEVICE)
*self.cObj1[1] = POLYLINE([DevCoords[0,I]+self.dCross, DevCoords[0,I]+(self.dCross/2)], [DevCoords[1,I], DevCoords[1,I]], '-r2', TARGET=(*self.win1), /DEVICE)
*self.cObj1[2] = POLYLINE([DevCoords[0,I], DevCoords[0,I]], [DevCoords[1,I]-self.dCross, DevCoords[1,I]-(self.dCross/2)], '-r2', TARGET=(*self.win1), /DEVICE)
*self.cObj1[3] = POLYLINE([DevCoords[0,I], DevCoords[0,I]], [DevCoords[1,I]+self.dCross, DevCoords[1,I]+(self.dCross/2)], '-r2', TARGET=(*self.win1), /DEVICE)
*self.eObj1 = ELLIPSE(DevCoords[0,I], DevCoords[1,I], MAJOR=self.dCross, '-r2', TARGET=(*self.win1), /DEVICE, FILL_BACKGROUND=0)

Cheers,
Helder
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Extracting surface reflectance time series into a table based on date
Next Topic: IDL 8.2, read pixel value along a surface

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:38:25 PDT 2025

Total time taken to generate the page: 0.00440 seconds