Image Plotting Problem

Please support our C# advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2007
Posts: 81
Reputation: it2051229 is an unknown quantity at this point 
Solved Threads: 1
it2051229 it2051229 is offline Offline
Junior Poster in Training

Image Plotting Problem

 
0
  #1
Dec 27th, 2008
I'm having trouble on how am going to start this idea of mine. I have an image and I want to plot points on that image. My Idea is to get the X and Y coordinates of the mouse pointer and save it into a text file so that by the time I re-run the program again, the plotted points is still there. But it seems like this is not a good idea since everything will be messed up if I load the program to a computer with different screen size. I was thinking of placing an invisible grid, but looks like this will be tough to do.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,048
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 309
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Postaholic

Re: Image Plotting Problem

 
0
  #2
Dec 28th, 2008
You could look at this snippet http://www.daniweb.com/code/snippet1020.html
It uses coordinate transformations, so you are independent of a screen.
You can have an invisible grid by adding a form with FormBorderStyle set to none and Opacity set to zero Be carefull you must provide another way to close this form than the usual closebox because there isn't one.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 49
Reputation: iDeveloper is an unknown quantity at this point 
Solved Threads: 7
iDeveloper iDeveloper is offline Offline
Light Poster

Re: Image Plotting Problem

 
0
  #3
Dec 28th, 2008
Well, you could create a 2D array to resemble the grid. When someone clicks on the mouse, you could take the mouse pointer (relative to the window not the screen) and convert it to the position in your array. You could even create a nice little collection class to store the grid and then simply serialize it when you need to store the grid.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum


Views: 354 | Replies: 2
Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC