esponse to : Getting mouse click coordinates
Subject : Getting mouse click coordinates
I think Indication agent works only in drawing. Hence try to use CATPathElement agent. And to get the x.y coordinate on screen use CATGraphicPathElement. The snippet of code is as below.
CATGraphicPathElement *graph_path = (CATGraphicPathElement *)sel_path;
CATGraphicElementIntersection *graph_intersection =
CATMathPoint intersection_point = graph_intersection->point;
Original message :
Hello, I’m using an indication agent to get the x,y point of the mouse click. Does anyone know
how to find out what element I’ve selected with that mouse click without declaring another agent? Or if I select an element, how do I get the x,y of the mouse?