From: <DHe...@ao...> - 2008-04-22 13:33:23
|
Bartek, Looks like the code you are looking for is in the Nplot library file: Windows.PlotSurface2D.cs in the DoMouseMove function. Look for "if ( coordinates_.Active )" - the code you need is after the "if". I tried this: If you create a MouseClick event for your plotsurface instance and add the following code: Point here = new Point(e.X, e.Y); double x = plotSurface.PhysicalXAxis1Cache.PhysicalToWorld(here, true); double y = plotSurface.PhysicalYAxis1Cache.PhysicalToWorld(here, true); The x & y should be the coordinates you are looking for. Did you get the source code for Nplot to compile? Deb -----Original Message----- From: Bartek K [mailto:mor...@gm...] Sent: Monday, April 21, 2008 9:45 PM To: npl...@li... Subject: [Nplot-devel] obtaining xy coordinates on mousedown event Hello! Cant find solution to my problem.. When displaying plot with showcoordinates property set to 'true' i can see coordinates next to mouse cursor. The problem is I don't know how to assign current x/y coord to a variable. Any ideas would be appreciated! -- bartek kujda ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao ne _______________________________________________ Nplot-devel mailing list Npl...@li... https://lists.sourceforge.net/lists/listinfo/nplot-devel __________ NOD32 3044 (20080421) Information __________ This message was checked by NOD32 antivirus system. _http://www.eset.com_ (http://www.eset.com) **************Need a new ride? Check out the largest site for U.S. used car listings at AOL Autos. (http://autos.aol.com/used?NCID=aolcmp00300000002851) |