kaiserfarrell / core-plot

Automatically exported from code.google.com/p/core-plot
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Convert global mouse coordinates to plot coordinates #429

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'd like to request a convenience method that converts the global mouse 
coordinates that are obtained from an NSEvent to local coordinates in a plot. 
These local coordinates could then be queried for instance to obtain the index 
of the plot point closest to the mouse. Or when used in combination with 
http://code.google.com/p/core-plot/issues/detail?id=388, it could be used to 
getting the delta between two points when dragging the mouse. See also this 
discussion: 
http://groups.google.com/group/coreplot-discuss/browse_thread/thread/27432349ff9
57575

Original issue reported on code.google.com by koenvand...@gmail.com on 23 Apr 2012 at 12:31

GoogleCodeExporter commented 8 years ago
Could you define what you mean by "local coordinates"? Are you looking for the 
view coordinates in the plot layer or plot data values?

Original comment by eskr...@mac.com on 23 Apr 2012 at 11:47

GoogleCodeExporter commented 8 years ago
I mean the view coordinates in the plot layer.   Right now it takes a few lines 
to do the conversion,  and I thought it would be nice to have a convenience 
method take care of that.

Original comment by koenvand...@gmail.com on 24 Apr 2012 at 1:56

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 24 Apr 2012 at 3:05

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 28 Apr 2012 at 8:21

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 19f8cecf099b.

Original comment by eskr...@mac.com on 30 Apr 2012 at 12:56