Re: Reading Pixels
"Rory Daulton" <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.programming |
|---|---|
| Message-ID | <001e01c357aa$f4930b00$6501a8c0@laptop> |
Steve, > I have a TImage component loaded with a map of Europe. Each country is > coloured differently. When the user clicks on the map I want to read > what country they are clicking on. I assume the easiest way to do this > is to read the pixel colour. If that's right how do I do it? > Or is there a better way? If each country has a uniform colour, that is one way to do it. Another way is to (in advance) figure out the polygon coordinates for each country on the map, then when the user clicks to use the location to figure which polygon surrounds the point clicked. I can help you with algorithms to do this if you like, but you need to somehow (probably manually) figure out the polygon. Rory Daulton [email protected] --- [This E-mail scanned for viruses by Declude Virus and Nmax "Your MAXimum Connection!"] [This E-mail scanned for spam by Declude JunkMail and Nmax "Your MAXimum Connection!"] ------------------------ Yahoo! Groups Sponsor ---------------------~--> Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more. http://www.c1tracking.com/l.asp?cid=5510 http://us.click.yahoo.com/GHXcIA/n.WGAA/ySSFAA/i7folB/TM ---------------------------------------------------------------------~-> CodeCoffer - new Delphi code protection Tool! http://www.delphicollection.com/public/CodeCoffer.htm --------------------------------------------------------------- Unsubscribe:[email protected] List owner:[email protected] --------------------------------------------------------------- Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/