Page 1 of 1

Obtain the coordinates of the mouse in the graphics objects

Posted: Wed Oct 15, 2014 1:28 am
by Eugene Lutsenko
Is it possible to click the mouse cursor on the image of the graphic to get the coordinates of the cursor inside it in pixels? If possible, how to do it?

Re: Obtain the coordinates of the mouse in the graphics obje

Posted: Wed Oct 15, 2014 10:31 am
by rdonnay
oStatic:lbClick := {|a,b,o|aCoords := b}

Re: Obtain the coordinates of the mouse in the graphics obje

Posted: Thu Oct 16, 2014 12:57 am
by Tom
To track cursor position with any move over the object:

Code: Select all

@ x,y DCSTATIC ... EVAL {|o|o:Motion := {|aPos|oPosObject:SetCaption(Str(aPos[1])+/Str(aPos[2]))}}

@ a,b DCSAY '' OBJECT oPosObject SIZE 20,1

Re: Obtain the coordinates of the mouse in the graphics obje

Posted: Thu Oct 16, 2014 8:36 am
by Eugene Lutsenko
Somewhere I saw a simple graphical editor similar to Paint, made ​​in Alaska. And now could not find it. Tell me, please, where to find the source.